aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar David Eklov <david.eklov@gmail.com>2016-07-11 22:51:50 -0500
committerLibravatar David Eklov <david.eklov@gmail.com>2016-07-15 19:14:31 -0500
commit250ddc66c672f62a3c7f44db73b5c4d0661093ba (patch)
treea1821de987be001f015e1ad0240765bdafe12130
parentFix warning from unused daemon return value (diff)
downloadsway-250ddc66c672f62a3c7f44db73b5c4d0661093ba.tar.gz
sway-250ddc66c672f62a3c7f44db73b5c4d0661093ba.tar.zst
sway-250ddc66c672f62a3c7f44db73b5c4d0661093ba.zip
Rename pointer_input::notify to indicate that is called on button clicks
-rw-r--r--include/client/window.h2
-rw-r--r--swaybar/bar.c2
-rw-r--r--wayland/window.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/include/client/window.h b/include/client/window.h
index 55a12225..98d19a2b 100644
--- a/include/client/window.h
+++ b/include/client/window.h
@@ -31,7 +31,7 @@ struct pointer_input {
31 int last_x; 31 int last_x;
32 int last_y; 32 int last_y;
33 33
34 void (*notify)(struct window *window, int x, int y, uint32_t button); 34 void (*notify_button)(struct window *window, int x, int y, uint32_t button);
35}; 35};
36 36
37struct window { 37struct window {
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 4f8063ac..c0aa85c7 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -124,7 +124,7 @@ void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id) {
124 bar_output->window->font = bar->config->font; 124 bar_output->window->font = bar->config->font;
125 125
126 /* set font */ 126 /* set font */
127 bar_output->window->pointer_input.notify = mouse_button_notify; 127 bar_output->window->pointer_input.notify_button = mouse_button_notify;
128 128
129 /* set window height */ 129 /* set window height */
130 set_window_height(bar_output->window, bar->config->height); 130 set_window_height(bar_output->window, bar->config->height);
diff --git a/wayland/window.c b/wayland/window.c
index 9b6e5b00..2a76654b 100644
--- a/wayland/window.c
+++ b/wayland/window.c
@@ -41,8 +41,8 @@ static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32
41 struct window *window = data; 41 struct window *window = data;
42 struct pointer_input *input = &window->pointer_input; 42 struct pointer_input *input = &window->pointer_input;
43 43
44 if (window->pointer_input.notify) { 44 if (window->pointer_input.notify_button) {
45 window->pointer_input.notify(window, input->last_x, input->last_y, button); 45 window->pointer_input.notify_button(window, input->last_x, input->last_y, button);
46 } 46 }
47} 47}
48 48