* vim:ts=4:sw=4:expandtab
*
* i3 - an improved dynamic tiling window manager
- * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
*
* click.c: Button press (mouse click) events.
*
/* get the floating con */
Con *floatingcon = con_inside_floating(con);
- const bool proportional = (event->state & BIND_SHIFT);
+ const bool proportional = (event->state & XCB_KEY_BUT_MASK_SHIFT) == XCB_KEY_BUT_MASK_SHIFT;
const bool in_stacked = (con->parent->layout == L_STACKED || con->parent->layout == L_TABBED);
/* 1: see if the user scrolled on the decoration of a stacked/tabbed con */
*/
int handle_button_press(xcb_button_press_event_t *event) {
Con *con;
- DLOG("Button %d %s on window 0x%08x (child 0x%08x) at (%d, %d) (root %d, %d)\n",
- event->state, (event->response_type == XCB_BUTTON_PRESS ? "press" : "release"),
+ DLOG("Button %d (state %d) %s on window 0x%08x (child 0x%08x) at (%d, %d) (root %d, %d)\n",
+ event->detail, event->state, (event->response_type == XCB_BUTTON_PRESS ? "press" : "release"),
event->event, event->child, event->event_x, event->event_y, event->root_x,
event->root_y);
last_timestamp = event->time;
- const uint32_t mod = config.floating_modifier;
+ const uint32_t mod = (config.floating_modifier & 0xFFFF);
const bool mod_pressed = (mod != 0 && (event->state & mod) == mod);
DLOG("floating_mod = %d, detail = %d\n", mod_pressed, event->detail);
if ((con = con_by_window_id(event->event)))