aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-11-23 14:24:33 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-11-23 14:24:33 +0100
commit58d42b6edf3b08c34878448ca0153cede91463cf (patch)
treecde39fa1502843d6f0c399be5e1778efb66614ff /nx-X11/programs/Xserver/hw
parentb6fae31a27591c1e04fdf74ec31e7dc95ba77fc5 (diff)
parent6e08d43716d40426339f3cdbeddfebbe4405803b (diff)
downloadnx-libs-3.6.x.tar.gz
nx-libs-3.6.x.tar.bz2
nx-libs-3.6.x.zip
Merge branch 'uli42-pr/fix_qt_clientevents' into 3.6.xHEAD3.6.x
Attributes GH PR #1078: https://github.com/ArcticaProject/nx-libs/pull/1078
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.c8
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Events.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c
index 6456e244a..c8371b57c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c
@@ -4505,14 +4505,14 @@ 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);
WindowPtr pWin = (WindowPtr)SecurityLookupWindow(stuff->destination, client,
DixReadAccess);
- if (stuff->event.u.clientMessage.u.l.type == netwmstate || stuff->event.u.clientMessage.u.l.type == wmchangestate)
+ if (pWin && (stuff->event.u.clientMessage.u.l.type == netwmstate || stuff->event.u.clientMessage.u.l.type == wmchangestate))
{
if (pWin->drawable.id == pWin->drawable.pScreen->root->drawable.id)
{
@@ -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
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h
index 379bbbcc6..7b15f6274 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Events.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h
@@ -222,6 +222,6 @@ int nxagentPendingEvents(Display *dpy);
int nxagentWaitEvents(Display *, useconds_t msec);
-void ForwardClientMessage(ClientPtr client, xSendEventReq *stuff);
+Bool ForwardClientMessage(ClientPtr client, xSendEventReq *stuff);
#endif /* __Events_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 68fb3f412..f5c5fd2c9 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -429,8 +429,8 @@ ProcSendEvent(ClientPtr client)
if (nxagentOption(Rootless) && stuff->event.u.u.type == ClientMessage)
{
- ForwardClientMessage(client, stuff);
- return Success;
+ if (ForwardClientMessage(client, stuff))
+ return Success;
}
if (stuff -> event.u.u.type == SelectionNotify)