diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-27 23:43:44 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-08-27 14:10:16 +0200 |
commit | 063813d35549a52358b0df8e5ede4e105f2e4d96 (patch) | |
tree | bf61dd1bd2ce00892056b52184102600a5f910e6 /nx-X11/programs/Xserver | |
parent | 14d8e0a2a69f2468a49fcb53c4ba7e12cea10b1d (diff) | |
download | nx-libs-063813d35549a52358b0df8e5ede4e105f2e4d96.tar.gz nx-libs-063813d35549a52358b0df8e5ede4e105f2e4d96.tar.bz2 nx-libs-063813d35549a52358b0df8e5ede4e105f2e4d96.zip |
Make AutoGrab work in more situations
Especially switchin to/from fullscreen with active AutoGrab was
problematic. Works much smoother now.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 020278841..f3e7880c8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -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; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 59b33b6be..80e9bef3b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -754,7 +754,12 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) else { nxagentFullscreenWindow = None; - nxagentUngrabPointerAndKeyboard(NULL); + + /* 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); } |