diff options
-rw-r--r-- | include/client/window.h | 3 | ||||
-rw-r--r-- | swaybar/bar.c | 8 | ||||
-rw-r--r-- | wayland/window.c | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/include/client/window.h b/include/client/window.h index e07e3509..296dd9ed 100644 --- a/include/client/window.h +++ b/include/client/window.h | |||
@@ -38,8 +38,7 @@ struct pointer_input { | |||
38 | int last_x; | 38 | int last_x; |
39 | int last_y; | 39 | int last_y; |
40 | 40 | ||
41 | void (*notify_button)(struct window *window, int x, int y, uint32_t button); | 41 | void (*notify_button)(struct window *window, int x, int y, uint32_t button, uint32_t state_w); |
42 | |||
43 | void (*notify_scroll)(struct window *window, enum scroll_direction direction); | 42 | void (*notify_scroll)(struct window *window, enum scroll_direction direction); |
44 | }; | 43 | }; |
45 | 44 | ||
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) { | |||
58 | return output; | 58 | return output; |
59 | } | 59 | } |
60 | 60 | ||
61 | static void mouse_button_notify(struct window *window, int x, int y, uint32_t button) { | 61 | static void mouse_button_notify(struct window *window, int x, int y, |
62 | sway_log(L_DEBUG, "Mouse button %d clicked at %d %d\n", button, x, y); | 62 | uint32_t button, uint32_t state_w) { |
63 | sway_log(L_DEBUG, "Mouse button %d clicked at %d %d %d\n", button, x, y, state_w); | ||
64 | if (!state_w) { | ||
65 | return; | ||
66 | } | ||
63 | 67 | ||
64 | struct output *clicked_output = NULL; | 68 | struct output *clicked_output = NULL; |
65 | for (int i = 0; i < swaybar.outputs->length; i++) { | 69 | for (int i = 0; i < swaybar.outputs->length; i++) { |
diff --git a/wayland/window.c b/wayland/window.c index dfa6a997..9ebee2ba 100644 --- a/wayland/window.c +++ b/wayland/window.c | |||
@@ -42,7 +42,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32 | |||
42 | struct pointer_input *input = &window->pointer_input; | 42 | struct pointer_input *input = &window->pointer_input; |
43 | 43 | ||
44 | if (window->pointer_input.notify_button) { | 44 | if (window->pointer_input.notify_button) { |
45 | window->pointer_input.notify_button(window, input->last_x, input->last_y, button); | 45 | window->pointer_input.notify_button(window, input->last_x, input->last_y, button, state_w); |
46 | } | 46 | } |
47 | } | 47 | } |
48 | 48 | ||