[X2Go-Commits] [nx-libs] 213/219: Make AutoGrab work in more situations

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:11:09 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 063813d35549a52358b0df8e5ede4e105f2e4d96
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Thu Jun 27 23:43:44 2019 +0200

    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/Events.c |  2 +-
 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);
 }
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list