output-management: use same types as wlr_output

This is more correct and also makes things much nicer for languages
that don't allow implicit conversions between these types.
This commit is contained in:
Isaac Freund 2020-12-07 21:22:03 +01:00 committed by Simon Ser
parent 098094c5cb
commit d6890cb847
2 changed files with 4 additions and 4 deletions

View File

@ -50,12 +50,12 @@ struct wlr_output_head_v1_state {
bool enabled; bool enabled;
struct wlr_output_mode *mode; struct wlr_output_mode *mode;
struct { struct {
int width, height; int32_t width, height;
int refresh; int32_t refresh;
} custom_mode; } custom_mode;
int32_t x, y; int32_t x, y;
enum wl_output_transform transform; enum wl_output_transform transform;
double scale; float scale;
}; };
struct wlr_output_head_v1 { struct wlr_output_head_v1 {

View File

@ -240,7 +240,7 @@ static void config_head_handle_set_scale(struct wl_client *client,
return; return;
} }
double scale = wl_fixed_to_double(scale_fixed); float scale = wl_fixed_to_double(scale_fixed);
if (scale <= 0) { if (scale <= 0) {
wl_resource_post_error(config_head_resource, wl_resource_post_error(config_head_resource,
ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_SCALE, ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_SCALE,