You need to sign in or sign up before continuing.
Commit 063813d3 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Make AutoGrab work in more situations

Especially switchin to/from fullscreen with active AutoGrab was problematic. Works much smoother now.
parent 14d8e0a2
......@@ -1699,7 +1699,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was
#endif /* NXAGENT_FIXKEYS */
if (nxagentOption(AutoGrab))
if (nxagentOption(AutoGrab) && !nxagentFullscreenWindow)
{
XlibWindow w;
int revert_to;
......
......@@ -754,6 +754,11 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
else
{
nxagentFullscreenWindow = None;
/* if we had AutoGrab before entering fullscreen reactivate it now */
if (nxagentOption(AutoGrab))
nxagentGrabPointerAndKeyboard(NULL);
else
nxagentUngrabPointerAndKeyboard(NULL);
}
}
......@@ -1005,6 +1010,10 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn)
XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
nxagentOption(Width), nxagentOption(Height));
/* if we had AutoGrab before entering fullscreen reactivate it now */
if (nxagentOption(AutoGrab))
nxagentGrabPointerAndKeyboard(NULL);
nxagentSetPrintGeometry(pScreen -> myNum);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment