[X2Go-Commits] [nx-libs] 83/219: Events.c: use designated initializer in nxagentDeactivatePointerGrab

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:26 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 17d5e62ba400e105b7faf130ef31db299a5478c7
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jun 17 21:57:45 2019 +0200

    Events.c: use designated initializer in nxagentDeactivatePointerGrab
---
 nx-X11/programs/Xserver/hw/nxagent/Events.c | 32 +++++++++++++++--------------
 1 file changed, 17 insertions(+), 15 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 4bddbba3a..8e976779d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -4011,21 +4011,23 @@ void nxagentDeactivatePointerGrab(void)
 
   if (grab)
   {
-    XButtonEvent X;
-    memset(&X, 0, sizeof(XButtonEvent));
-
-    X.type = ButtonRelease;
-    X.serial = 0;
-    X.send_event = FALSE;
-    X.time = currentTime.milliseconds;
-    X.display = nxagentDisplay;
-    X.window = nxagentWindow(grab -> window);
-    X.root = RootWindow(nxagentDisplay, 0);
-    X.subwindow = 0;
-    X.x = X.y = X.x_root = X.y_root = 0;
-    X.state = 0x100;
-    X.button = 1;
-    X.same_screen = TRUE;
+    XButtonEvent X = {
+      .type = ButtonRelease,
+      .serial = 0,
+      .send_event = FALSE,
+      .time = currentTime.milliseconds,
+      .display = nxagentDisplay,
+      .window = nxagentWindow(grab -> window),
+      .root = RootWindow(nxagentDisplay, 0),
+      .subwindow = 0,
+      .x = 0,
+      .y = 0,
+      .x_root = 0,
+      .y_root = 0,
+      .state = 0x100,
+      .button = 1,
+      .same_screen = TRUE,
+    };
 
     XPutBackEvent(nxagentDisplay, (XEvent*)&X);
   }

--
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