aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-12-07 21:22:03 +0100
committerSimon Ser <contact@emersion.fr>2021-01-10 16:28:19 +0100
commitd6890cb847de6adb95f9579937a9cce049f076b8 (patch)
treef78f2a9dab50ba99f2b9ec356d9faf41fb57ff7e
parent098094c5cbfd72ad989b9418b70acd531cbb5f17 (diff)
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.
-rw-r--r--include/wlr/types/wlr_output_management_v1.h6
-rw-r--r--types/wlr_output_management_v1.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_output_management_v1.h b/include/wlr/types/wlr_output_management_v1.h
index 945d57f0..c0551ac1 100644
--- a/include/wlr/types/wlr_output_management_v1.h
+++ b/include/wlr/types/wlr_output_management_v1.h
@@ -50,12 +50,12 @@ struct wlr_output_head_v1_state {
bool enabled;
struct wlr_output_mode *mode;
struct {
- int width, height;
- int refresh;
+ int32_t width, height;
+ int32_t refresh;
} custom_mode;
int32_t x, y;
enum wl_output_transform transform;
- double scale;
+ float scale;
};
struct wlr_output_head_v1 {
diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c
index ed53171f..7acfe9d9 100644
--- a/types/wlr_output_management_v1.c
+++ b/types/wlr_output_management_v1.c
@@ -240,7 +240,7 @@ static void config_head_handle_set_scale(struct wl_client *client,
return;
}
- double scale = wl_fixed_to_double(scale_fixed);
+ float scale = wl_fixed_to_double(scale_fixed);
if (scale <= 0) {
wl_resource_post_error(config_head_resource,
ZWLR_OUTPUT_CONFIGURATION_HEAD_V1_ERROR_INVALID_SCALE,