aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-05-22 21:20:32 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-11-01 16:36:24 +0100
commitb64e1f60bb41d3fa36c9992c675d5d8977612191 (patch)
tree4ee562e52a77e092d3dd3fffc77b56cbd20bd9e9 /nx-X11/programs/Xserver
parenta6603778643168e766e142b2e77040bdfac3d710 (diff)
downloadnx-libs-b64e1f60bb41d3fa36c9992c675d5d8977612191.tar.gz
nx-libs-b64e1f60bb41d3fa36c9992c675d5d8977612191.tar.bz2
nx-libs-b64e1f60bb41d3fa36c9992c675d5d8977612191.zip
NXevents.c: call upstream version of ProcSendEvent()
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/dix/events.c6
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c85
2 files changed, 7 insertions, 84 deletions
diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c
index fe18cba64..bcfa30936 100644
--- a/nx-X11/programs/Xserver/dix/events.c
+++ b/nx-X11/programs/Xserver/dix/events.c
@@ -3947,9 +3947,12 @@ CloseDownEvents(void)
spriteTraceSize = 0;
}
-#ifndef NXAGENT_SERVER
int
+#ifdef NXAGENT_SERVER
+xorg_ProcSendEvent(ClientPtr client)
+#else
ProcSendEvent(ClientPtr client)
+#endif
{
WindowPtr pWin;
WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
@@ -4034,7 +4037,6 @@ ProcSendEvent(ClientPtr client)
NullGrab, 0);
return Success;
}
-#endif /* NXAGENT_SERVER */
int
ProcUngrabKey(ClientPtr client)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
index 377843407..661eeae2b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
@@ -488,96 +488,17 @@ DefineInitialRootWindow(register WindowPtr win)
int
ProcSendEvent(ClientPtr client)
{
- WindowPtr pWin;
- WindowPtr effectiveFocus = NullWindow; /* only set if dest==InputFocus */
+#ifdef NXAGENT_CLIPBOARD
+
REQUEST(xSendEventReq);
REQUEST_SIZE_MATCH(xSendEventReq);
- /* The client's event type must be a core event type or one defined by an
- extension. */
-
-
-#ifdef NXAGENT_CLIPBOARD
-
if (stuff -> event.u.u.type == SelectionNotify)
{
if (nxagentSendNotify(&stuff->event) == 1)
return Success;
}
#endif
-
- if ( ! ((stuff->event.u.u.type > X_Reply &&
- stuff->event.u.u.type < LASTEvent) ||
- (stuff->event.u.u.type >= EXTENSION_EVENT_BASE &&
- stuff->event.u.u.type < (unsigned)lastEvent)))
- {
- client->errorValue = stuff->event.u.u.type;
- return BadValue;
- }
- if (stuff->event.u.u.type == ClientMessage &&
- stuff->event.u.u.detail != 8 &&
- stuff->event.u.u.detail != 16 &&
- stuff->event.u.u.detail != 32)
- {
- client->errorValue = stuff->event.u.u.detail;
- return BadValue;
- }
- if (stuff->eventMask & ~AllEventMasks)
- {
- client->errorValue = stuff->eventMask;
- return BadValue;
- }
-
- if (stuff->destination == PointerWindow)
- pWin = sprite.win;
- else if (stuff->destination == InputFocus)
- {
- WindowPtr inputFocus = inputInfo.keyboard->focus->win;
-
- if (inputFocus == NoneWin)
- return Success;
-
- /* If the input focus is PointerRootWin, send the event to where
- the pointer is if possible, then perhaps propagate up to root. */
- if (inputFocus == PointerRootWin)
- inputFocus = ROOT;
-
- if (IsParent(inputFocus, sprite.win))
- {
- effectiveFocus = inputFocus;
- pWin = sprite.win;
- }
- else
- effectiveFocus = pWin = inputFocus;
- }
- else
- pWin = SecurityLookupWindow(stuff->destination, client,
- DixReadAccess);
- if (!pWin)
- return BadWindow;
- if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue))
- {
- client->errorValue = stuff->propagate;
- return BadValue;
- }
- stuff->event.u.u.type |= 0x80;
- if (stuff->propagate)
- {
- for (;pWin; pWin = pWin->parent)
- {
- if (DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask,
- NullGrab, 0))
- return Success;
- if (pWin == effectiveFocus)
- return Success;
- stuff->eventMask &= ~wDontPropagateMask(pWin);
- if (!stuff->eventMask)
- break;
- }
- }
- else
- (void)DeliverEventsToWindow(pWin, &stuff->event, 1, stuff->eventMask,
- NullGrab, 0);
- return Success;
+ return xorg_ProcSendEvent(client);
}