From 1243a855d426aefe5bcf4f9dd7e7d7ac8e46b1c8 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Fri, 4 Nov 2022 21:53:39 +0300 Subject: [PATCH] xdg-shell: fix geometry types --- include/wlr/types/wlr_xdg_shell.h | 14 +++++++------- types/xdg_shell/wlr_xdg_toplevel.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/include/wlr/types/wlr_xdg_shell.h b/include/wlr/types/wlr_xdg_shell.h index db1d7bd5..f54f74e2 100644 --- a/include/wlr/types/wlr_xdg_shell.h +++ b/include/wlr/types/wlr_xdg_shell.h @@ -135,9 +135,9 @@ enum wlr_xdg_surface_role { struct wlr_xdg_toplevel_state { bool maximized, fullscreen, resizing, activated; uint32_t tiled; // enum wlr_edges - uint32_t width, height; - uint32_t max_width, max_height; - uint32_t min_width, min_height; + int32_t width, height; + int32_t max_width, max_height; + int32_t min_width, min_height; }; enum wlr_xdg_toplevel_wm_capabilities { @@ -156,9 +156,9 @@ struct wlr_xdg_toplevel_configure { uint32_t fields; // enum wlr_xdg_toplevel_configure_field bool maximized, fullscreen, resizing, activated; uint32_t tiled; // enum wlr_edges - uint32_t width, height; + int32_t width, height; struct { - uint32_t width, height; + int32_t width, height; } bounds; uint32_t wm_capabilities; // enum wlr_xdg_toplevel_wm_capabilities }; @@ -307,7 +307,7 @@ struct wlr_xdg_toplevel_show_window_menu_event { struct wlr_xdg_toplevel *toplevel; struct wlr_seat_client *seat; uint32_t serial; - uint32_t x, y; + int32_t x, y; }; /** @@ -358,7 +358,7 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface); * configure serial. */ uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_toplevel *toplevel, - uint32_t width, uint32_t height); + int32_t width, int32_t height); /** * Request that this toplevel show itself in an activated or deactivated diff --git a/types/xdg_shell/wlr_xdg_toplevel.c b/types/xdg_shell/wlr_xdg_toplevel.c index 420b1de4..54309f96 100644 --- a/types/xdg_shell/wlr_xdg_toplevel.c +++ b/types/xdg_shell/wlr_xdg_toplevel.c @@ -101,8 +101,8 @@ struct wlr_xdg_toplevel_configure *send_xdg_toplevel_configure( } assert(nstates <= sizeof(states) / sizeof(states[0])); - uint32_t width = configure->width; - uint32_t height = configure->height; + int32_t width = configure->width; + int32_t height = configure->height; struct wl_array wl_states = { .size = nstates * sizeof(states[0]), .data = states, @@ -532,7 +532,7 @@ void wlr_xdg_toplevel_send_close(struct wlr_xdg_toplevel *toplevel) { } uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_toplevel *toplevel, - uint32_t width, uint32_t height) { + int32_t width, int32_t height) { toplevel->scheduled.width = width; toplevel->scheduled.height = height; return wlr_xdg_surface_schedule_configure(toplevel->base);