From: Campbell Barton Date: Sun, 8 Jun 2014 07:14:27 +0000 (+1000) Subject: Use XCB_BUTTON_INDEX defines for mouse buttons X-Git-Tag: 4.8~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=030595a4ebb0ffd2539cbeb4d5fdf18669e4b812;p=i3%2Fi3 Use XCB_BUTTON_INDEX defines for mouse buttons --- diff --git a/src/click.c b/src/click.c index 9b85b711..69cb7d22 100644 --- a/src/click.c +++ b/src/click.c @@ -243,7 +243,7 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod /* 5: resize (floating) if this was a (left or right) click on the * left/right/bottom border, or a right click on the decoration. * also try resizing (tiling) if it was a click on the top */ - if (mod_pressed && event->detail == 3) { + if (mod_pressed && event->detail == XCB_BUTTON_INDEX_3) { DLOG("floating resize due to floatingmodifier\n"); floating_resize_window(floatingcon, proportional, event); return 1; @@ -256,7 +256,7 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod goto done; } - if (dest == CLICK_DECORATION && event->detail == 3) { + if (dest == CLICK_DECORATION && event->detail == XCB_BUTTON_INDEX_3) { DLOG("floating resize due to decoration right click\n"); floating_resize_window(floatingcon, proportional, event); return 1; @@ -285,7 +285,7 @@ static int route_click(Con *con, xcb_button_press_event_t *event, const bool mod } /* 7: floating modifier pressed, initiate a resize */ - if (dest == CLICK_INSIDE && mod_pressed && event->detail == 3) { + if (dest == CLICK_INSIDE && mod_pressed && event->detail == XCB_BUTTON_INDEX_3) { if (floating_mod_on_tiled_client(con, event)) return 1; }