From 3e2d18ba63d804a1052663044ad61a57b2351ba8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 29 Jun 2024 19:13:03 +0200 Subject: prematurely abort ProcSendEvent if a ClientMsg has been fordwarded Fixes ArcticaProject/nx-libs#1065 --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Events.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 6456e244a..a29f08d1d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -4505,7 +4505,7 @@ int nxagentWaitEvents(Display *dpy, useconds_t msec) return 1; } -void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff) +Bool ForwardClientMessage(ClientPtr client, xSendEventReq *stuff) { Atom netwmstate = MakeAtom("_NET_WM_STATE", strlen("_NET_WM_STATE"), False); Atom wmchangestate = MakeAtom("WM_CHANGE_STATE", strlen("WM_CHANGE_STATE"), False); @@ -4548,7 +4548,7 @@ void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff) #endif } else - return; // ERROR! + return False; // ERROR! #ifdef DEBUG fprintf(stderr, "%s: window [0x%lx]\n", __func__, X.xclient.window); @@ -4568,8 +4568,10 @@ void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff) fprintf(stderr, "%s: send to window [0x%lx]\n", __func__, dest); fprintf(stderr, "%s: return Status [%d]\n", __func__, stat); #endif + return True; } } + return False; } #ifdef NX_DEBUG_INPUT -- cgit v1.2.3