diff options
author | Isaac Freund <mail@isaacfreund.com> | 2021-12-15 16:30:32 +0100 |
---|---|---|
committer | Kirill Primak <vyivel@posteo.net> | 2021-12-17 10:57:21 +0000 |
commit | 92d137c78ac05b565bfa06b5659aea52992e0dd7 (patch) | |
tree | a8f4bf5757289499e238af92dd6b1e9d9497b272 | |
parent | 7360810f2e5c71fe143b25b63517ab1a6475ce0a (diff) |
layer-shell: fix type of margins
These currently use uint32_t while they are an int32_t in the protocol.
-rw-r--r-- | include/wlr/types/wlr_layer_shell_v1.h | 2 | ||||
-rw-r--r-- | types/wlr_layer_shell_v1.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/wlr/types/wlr_layer_shell_v1.h b/include/wlr/types/wlr_layer_shell_v1.h index 694fb3b2..79e435a0 100644 --- a/include/wlr/types/wlr_layer_shell_v1.h +++ b/include/wlr/types/wlr_layer_shell_v1.h @@ -58,7 +58,7 @@ struct wlr_layer_surface_v1_state { uint32_t anchor; int32_t exclusive_zone; struct { - uint32_t top, right, bottom, left; + int32_t top, right, bottom, left; } margin; enum zwlr_layer_surface_v1_keyboard_interactivity keyboard_interactive; uint32_t desired_width, desired_height; diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 456dbc0e..d7a2123e 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -168,10 +168,10 @@ static void layer_surface_handle_set_margin( return; } - if (surface->current.margin.top == (uint32_t) top - && surface->current.margin.right == (uint32_t) right - && surface->current.margin.bottom == (uint32_t) bottom - && surface->current.margin.left == (uint32_t) left) { + if (surface->current.margin.top == top + && surface->current.margin.right == right + && surface->current.margin.bottom == bottom + && surface->current.margin.left == left) { surface->pending.committed &= ~WLR_LAYER_SURFACE_V1_STATE_MARGIN; } else { surface->pending.committed |= WLR_LAYER_SURFACE_V1_STATE_MARGIN; |