mirror of
https://github.com/debauchee/barrier.git
synced 2026-11-28 23:05:11 +08:00
Now warping mouse to center of screen when leaving client screens.
Some users requested this. Also, the hider window is mapped before warping the mouse so the active window shouldn't change if the focus policy is point-to-focus. Showing the window first can also reduce the likelihood of seeing the cursor briefly in its hidden position.
This commit is contained in:
@@ -173,8 +173,10 @@ CSecondaryScreen::leave()
|
||||
// restore toggle key state
|
||||
setToggleState(m_toggleKeys);
|
||||
|
||||
// hide mouse
|
||||
showWindow();
|
||||
// warp and hide mouse
|
||||
SInt32 x, y;
|
||||
getScreen()->getCursorCenter(x, y);
|
||||
showWindow(x, y);
|
||||
|
||||
// subclass hook
|
||||
onPostLeave();
|
||||
|
||||
Reference in New Issue
Block a user