aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-03 23:58:29 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:07 +0200
commitc233eec5fbc2c3dd253fe9e8a899530a3cd514c4 (patch)
tree8624b66b89793c63caa96a492dd372cff6de78b4 /nx-X11/programs
parent2ee7626a6efcf4ddf974485cbdc6212a6394ee36 (diff)
downloadnx-libs-c233eec5fbc2c3dd253fe9e8a899530a3cd514c4.tar.gz
nx-libs-c233eec5fbc2c3dd253fe9e8a899530a3cd514c4.tar.bz2
nx-libs-c233eec5fbc2c3dd253fe9e8a899530a3cd514c4.zip
Clipboard.c: introduce SendEventToClient helper
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 91bacc48c..3d1db5809 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -401,6 +401,11 @@ Status SendSelectionNotifyEventToServer(XSelectionEvent *event_to_send)
return result;
}
+int SendEventToClient(ClientPtr client, xEvent *pEvents)
+{
+ return TryClientEvents (client, pEvents, 1, NoEventMask, NoEventMask, NullGrab);
+}
+
Bool nxagentValidServerTargets(Atom target)
{
if (target == XA_STRING)
@@ -516,9 +521,7 @@ void nxagentClearSelection(XEvent *X)
x.u.selectionClear.window = lastSelectionOwner[i].window;
x.u.selectionClear.atom = CurrentSelections[i].selection;
- (void) TryClientEvents(lastSelectionOwner[i].client, &x, 1,
- NoEventMask, NoEventMask,
- NullGrab);
+ SendEventToClient(lastSelectionOwner[i].client, &x);
}
CurrentSelections[i].window = screenInfo.screens[0]->root->drawable.id;
@@ -687,9 +690,7 @@ FIXME: Do we need this?
x.u.selectionRequest.property = clientCutProperty;
- (void) TryClientEvents(lastSelectionOwner[i].client, &x, 1,
- NoEventMask, NoEventMask /* CantBeFiltered */,
- NullGrab);
+ SendEventToClient(lastSelectionOwner[i].client, &x);
#ifdef DEBUG
fprintf(stderr, "%s: Executed TryClientEvents with clientCutProperty.\n", __func__);
@@ -742,8 +743,7 @@ void nxagentSendSelectionNotify(Atom property)
x.u.selectionNotify.property = property;
- TryClientEvents(lastClientClientPtr, &x, 1, NoEventMask,
- NoEventMask , NullGrab);
+ SendEventToClient(lastClientClientPtr, &x);
return;
}
@@ -1415,8 +1415,7 @@ FIXME: Why this pointer can be not a valid
x.u.selectionNotify.target = target;
x.u.selectionNotify.property = None;
- (void) TryClientEvents(client, &x, 1, NoEventMask,
- NoEventMask , NullGrab);
+ SendEventToClient(client, &x);
}
int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
@@ -1521,8 +1520,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
x.u.selectionNotify.target = target;
x.u.selectionNotify.property = property;
- (void) TryClientEvents(client, &x, 1, NoEventMask,
- NoEventMask , NullGrab);
+ SendEventToClient(client, &x);
return 1;
}
@@ -1554,8 +1552,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
x.u.selectionNotify.target = target;
x.u.selectionNotify.property = property;
- (void) TryClientEvents(client, &x, 1, NoEventMask,
- NoEventMask , NullGrab);
+ SendEventToClient(client, &x);
return 1;
@@ -1642,7 +1639,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
x.u.selectionNotify.selection = selection;
x.u.selectionNotify.target = target;
x.u.selectionNotify.property = None;
- (void) TryClientEvents(client, &x, 1, NoEventMask, NoEventMask , NullGrab);
+ SendEventToClient(client, &x);
return 1;
}
return 0;