Focus windows when middle-clicking (X paste)
As with most click-based focusing, this only has an effect when focus_follows_mouse is disabled.
This commit is contained in:
parent
c406b4c2fe
commit
fdfbc53c0b
|
@ -172,9 +172,13 @@ void manage_window(xcb_window_t window, xcb_get_window_attributes_cookie_t cooki
|
||||||
|
|
||||||
xcb_grab_button(conn, false, window, XCB_EVENT_MASK_BUTTON_PRESS,
|
xcb_grab_button(conn, false, window, XCB_EVENT_MASK_BUTTON_PRESS,
|
||||||
XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, root, XCB_NONE,
|
XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, root, XCB_NONE,
|
||||||
3 /* right mouse button */,
|
2 /* middle mouse button */,
|
||||||
XCB_BUTTON_MASK_ANY /* don’t filter for any modifiers */);
|
XCB_BUTTON_MASK_ANY /* don’t filter for any modifiers */);
|
||||||
|
|
||||||
|
xcb_grab_button(conn, false, window, XCB_EVENT_MASK_BUTTON_PRESS,
|
||||||
|
XCB_GRAB_MODE_SYNC, XCB_GRAB_MODE_ASYNC, root, XCB_NONE,
|
||||||
|
3 /* right mouse button */,
|
||||||
|
XCB_BUTTON_MASK_ANY /* don’t filter for any modifiers */);
|
||||||
|
|
||||||
/* update as much information as possible so far (some replies may be NULL) */
|
/* update as much information as possible so far (some replies may be NULL) */
|
||||||
window_update_class(cwindow, xcb_get_property_reply(conn, class_cookie, NULL), true);
|
window_update_class(cwindow, xcb_get_property_reply(conn, class_cookie, NULL), true);
|
||||||
|
|
Loading…
Reference in New Issue