change mousebind code to use already existing enums

Also added an #include statement to ssd.h so it would compile without
depending on other headers to be #included before it
This commit is contained in:
alex 2021-08-30 18:42:38 -04:00 committed by Johan Malm
parent 36f5b49f2a
commit 92891b4dfa
4 changed files with 22 additions and 34 deletions

View file

@ -346,9 +346,9 @@ cursor_button(struct wl_listener *listener, void *data)
if (is_double_click(rc.doubleclick_time) && view_area == LAB_SSD_PART_TITLEBAR) {
struct mousebind* mousebind;
wl_list_for_each_reverse(mousebind, &rc.mousebinds, link) {
if( (mousebind->context == MOUSE_CONTEXT_TITLEBAR) &&
if( (mousebind->context == LAB_SSD_PART_TITLEBAR) &&
(mousebind->mouse_action == MOUSE_ACTION_DOUBLECLICK) &&
(mousebind->button == (enum mouse_button)event->button) ) {
(mousebind->button == event->button) ) {
action(server, mousebind->action, mousebind->command);
}
}