aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-04 23:21:37 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-05 18:01:43 +1000
commit6f717493989e08dcaa6da209ab31ec6189bee7a7 (patch)
treea4548ee9b417278e5aab9d9659e01b01e5d1d306 /sway/input/cursor.c
parentFix crash when view in scratchpad becomes urgent (diff)
downloadsway-6f717493989e08dcaa6da209ab31ec6189bee7a7.tar.gz
sway-6f717493989e08dcaa6da209ab31ec6189bee7a7.tar.zst
sway-6f717493989e08dcaa6da209ab31ec6189bee7a7.zip
Fix clicking workspace buttons
Because node_at_coords was returning the workspace's node, it interpreted this as clicking the focused workspace which was a no op.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 3ba20ef0..19dc3165 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -91,7 +91,7 @@ static struct sway_node *node_at_coords(
91 if ((*surface = layer_surface_at(output, 91 if ((*surface = layer_surface_at(output,
92 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY], 92 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
93 ox, oy, sx, sy))) { 93 ox, oy, sx, sy))) {
94 return &ws->node; 94 return NULL;
95 } 95 }
96 if (ws->fullscreen) { 96 if (ws->fullscreen) {
97 struct sway_container *con = 97 struct sway_container *con =
@@ -104,7 +104,7 @@ static struct sway_node *node_at_coords(
104 if ((*surface = layer_surface_at(output, 104 if ((*surface = layer_surface_at(output,
105 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], 105 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
106 ox, oy, sx, sy))) { 106 ox, oy, sx, sy))) {
107 return &ws->node; 107 return NULL;
108 } 108 }
109 109
110 struct sway_container *c; 110 struct sway_container *c;
@@ -115,12 +115,12 @@ static struct sway_node *node_at_coords(
115 if ((*surface = layer_surface_at(output, 115 if ((*surface = layer_surface_at(output,
116 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM], 116 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
117 ox, oy, sx, sy))) { 117 ox, oy, sx, sy))) {
118 return &ws->node; 118 return NULL;
119 } 119 }
120 if ((*surface = layer_surface_at(output, 120 if ((*surface = layer_surface_at(output,
121 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND], 121 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
122 ox, oy, sx, sy))) { 122 ox, oy, sx, sy))) {
123 return &ws->node; 123 return NULL;
124 } 124 }
125 125
126 return &ws->node; 126 return &ws->node;