summaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-07-16 09:09:22 -0400
committerFurkan Sahin <furkan-dev@proton.me>2016-07-16 09:09:22 -0400
commit4b8e18d60b60f34a59a00befca9c03d6c4ce41fb (patch)
treebdd978690510d35a170399ee0d078c6a4ac5f64b /swaybar
parent20abc2f550f9d3b9cee2c0e9483179bbb00df78f (diff)
Fix #753
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/bar.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 82e136e4..9009e1ff 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -58,8 +58,12 @@ struct output *new_output(const char *name) {
return output;
}
-static void mouse_button_notify(struct window *window, int x, int y, uint32_t button) {
- sway_log(L_DEBUG, "Mouse button %d clicked at %d %d\n", button, x, y);
+static void mouse_button_notify(struct window *window, int x, int y,
+ uint32_t button, uint32_t state_w) {
+ sway_log(L_DEBUG, "Mouse button %d clicked at %d %d %d\n", button, x, y, state_w);
+ if (!state_w) {
+ return;
+ }
struct output *clicked_output = NULL;
for (int i = 0; i < swaybar.outputs->length; i++) {