aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/NXevents.c
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/hw/nxagent/NXevents.c
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/hw/nxagent/NXevents.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXevents.c85
1 files changed, 3 insertions, 82 deletions
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);
}