Only warp pointer once during x_push_changes()
- Introduce warp_to static variable in x.c that stores the coordinates to warp to as a Rect. - Add x_set_warp_to function to set this variable. Use in _tree_next, workspace_show, and con_move_to_workspace. - In x_push_chanages, if warp_to is set, then call xcb_warp_pointer_rect and then reset it to NULL. This fixes all know bugs for pointer warping for me.
This commit is contained in:
committed by
Michael Stapelberg
parent
637d2a3d62
commit
36224f86d1
@ -104,4 +104,11 @@ void x_set_name(Con *con, const char *name);
|
||||
*/
|
||||
void x_set_i3_atoms();
|
||||
|
||||
/**
|
||||
* Set warp_to coordinates. This will trigger on the next call to
|
||||
* x_push_changes().
|
||||
*
|
||||
*/
|
||||
void x_set_warp_to(Rect *rect);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user