Rename pointer_input::notify to indicate that is called on button clicks
This commit is contained in:
parent
a11277c88f
commit
250ddc66c6
|
@ -31,7 +31,7 @@ struct pointer_input {
|
|||
int last_x;
|
||||
int last_y;
|
||||
|
||||
void (*notify)(struct window *window, int x, int y, uint32_t button);
|
||||
void (*notify_button)(struct window *window, int x, int y, uint32_t button);
|
||||
};
|
||||
|
||||
struct window {
|
||||
|
|
|
@ -124,7 +124,7 @@ void bar_setup(struct bar *bar, const char *socket_path, const char *bar_id) {
|
|||
bar_output->window->font = bar->config->font;
|
||||
|
||||
/* set font */
|
||||
bar_output->window->pointer_input.notify = mouse_button_notify;
|
||||
bar_output->window->pointer_input.notify_button = mouse_button_notify;
|
||||
|
||||
/* set window height */
|
||||
set_window_height(bar_output->window, bar->config->height);
|
||||
|
|
|
@ -41,8 +41,8 @@ static void pointer_handle_button(void *data, struct wl_pointer *pointer, uint32
|
|||
struct window *window = data;
|
||||
struct pointer_input *input = &window->pointer_input;
|
||||
|
||||
if (window->pointer_input.notify) {
|
||||
window->pointer_input.notify(window, input->last_x, input->last_y, button);
|
||||
if (window->pointer_input.notify_button) {
|
||||
window->pointer_input.notify_button(window, input->last_x, input->last_y, button);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue