ignore MotionNotify events generated while warping the pointer
This commit is contained in:
6
src/x.c
6
src/x.c
@ -920,8 +920,12 @@ void x_push_changes(Con *con) {
|
||||
|
||||
Output *current = get_output_containing(pointerreply->root_x, pointerreply->root_y);
|
||||
Output *target = get_output_containing(mid_x, mid_y);
|
||||
if (current != target)
|
||||
if (current != target) {
|
||||
/* Ignore MotionNotify events generated by warping */
|
||||
xcb_change_window_attributes(conn, root, XCB_CW_EVENT_MASK, (uint32_t[]){ XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT });
|
||||
xcb_warp_pointer(conn, XCB_NONE, root, 0, 0, 0, 0, mid_x, mid_y);
|
||||
xcb_change_window_attributes(conn, root, XCB_CW_EVENT_MASK, (uint32_t[]){ ROOT_EVENT_MASK });
|
||||
}
|
||||
}
|
||||
warp_to = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user