diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-17 21:57:45 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-06-19 00:49:57 +0200 |
commit | 17d5e62ba400e105b7faf130ef31db299a5478c7 (patch) | |
tree | 5b76d0c7e9bb55f0eafaede4e06f6ea8e18f84aa | |
parent | 5cb497146091acf84f389f6b459f5d2f8ea86643 (diff) | |
download | nx-libs-17d5e62ba400e105b7faf130ef31db299a5478c7.tar.gz nx-libs-17d5e62ba400e105b7faf130ef31db299a5478c7.tar.bz2 nx-libs-17d5e62ba400e105b7faf130ef31db299a5478c7.zip |
Events.c: use designated initializer in nxagentDeactivatePointerGrab
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Events.c | 32 |
1 files 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); } |