aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-03-24 18:02:42 -0400
committerDrew DeVault <sir@cmpwn.com>2018-03-27 18:50:32 -0400
commit11c57d22b0d7c24ee69d4c43cb08f03c7f35f0d4 (patch)
tree52451621b9c6179f7999afbec6f72fd23fab8e8f /rootston
parentd1c0e6fe2c21b4c7f651a82fb7342b54a4989c39 (diff)
Use 0 for default width/height (rather than -1)
Diffstat (limited to 'rootston')
-rw-r--r--rootston/layer_shell.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/rootston/layer_shell.c b/rootston/layer_shell.c
index 114a5f29..c4e82535 100644
--- a/rootston/layer_shell.c
+++ b/rootston/layer_shell.c
@@ -70,7 +70,7 @@ static void arrange_layer(struct wlr_output *output, struct wl_list *list) {
// Horizontal axis
const uint32_t both_horiz = ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT
| ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT;
- if ((state->anchor & both_horiz) && box.width == -1) {
+ if ((state->anchor & both_horiz) && box.width == 0) {
box.x = 0;
box.width = output_area.width;
} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT)) {
@@ -83,7 +83,7 @@ static void arrange_layer(struct wlr_output *output, struct wl_list *list) {
// Vertical axis
const uint32_t both_vert = ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP
| ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM;
- if ((state->anchor & both_vert) && box.height == -1) {
+ if ((state->anchor & both_vert) && box.height == 0) {
box.y = 0;
box.height = output_area.height;
} else if ((state->anchor & ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP)) {
@@ -97,9 +97,9 @@ static void arrange_layer(struct wlr_output *output, struct wl_list *list) {
box.width, box.height, box.x, box.y);
roots_surface->geo = box;
apply_exclusive(&output_area, state->anchor, state->exclusive_zone);
- if (box.width != (int)state->width
- || box.height != (int)state->height
- || !roots_surface->configured) {
+ if (!roots_surface->configured ||
+ box.width != (int)state->width ||
+ box.height != (int)state->height) {
wlr_layer_surface_configure(layer, box.width, box.height);
roots_surface->configured = true;
}