aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wlr/types/wlr_layer_shell_v1.h2
-rw-r--r--types/wlr_layer_shell_v1.c8
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;