From 063813d35549a52358b0df8e5ede4e105f2e4d96 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 27 Jun 2019 23:43:44 +0200 Subject: Make AutoGrab work in more situations Especially switchin to/from fullscreen with active AutoGrab was problematic. Works much smoother now. --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') 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); } -- cgit v1.2.3