aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-08-05 17:54:55 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-09-29 17:44:08 +0200
commit249e4321c67e9c3d9a4b6b0ee4ea80ef9ea7f63b (patch)
treee62cb1f0b1bf06f90d9d656573e6e9612ca20bce /nx-X11/programs
parentb393bca69640e27671e44a6c283b1499da9cacf9 (diff)
downloadnx-libs-249e4321c67e9c3d9a4b6b0ee4ea80ef9ea7f63b.tar.gz
nx-libs-249e4321c67e9c3d9a4b6b0ee4ea80ef9ea7f63b.tar.bz2
nx-libs-249e4321c67e9c3d9a4b6b0ee4ea80ef9ea7f63b.zip
Clipboard.c: introduce nxagentInitSelectionOwner
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 7d6b9ae2b..9ec160650 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1678,6 +1678,15 @@ WindowPtr nxagentGetClipboardWindow(Atom property)
}
}
+void nxagentInitSelectionOwner(SelectionOwner *owner, Atom selection)
+{
+ owner->selection = selection;
+ owner->client = NullClient;
+ owner->window = screenInfo.screens[0]->root->drawable.id;
+ owner->windowPtr = NULL;
+ owner->lastTimeChanged = GetTimeInMillis();
+}
+
int nxagentInitClipboard(WindowPtr pWin)
{
Window iWindow = nxagentWindow(pWin);
@@ -1697,17 +1706,8 @@ int nxagentInitClipboard(WindowPtr pWin)
serverTIMESTAMP = nxagentAtoms[11]; /* TIMESTAMP */
- lastSelectionOwner[nxagentPrimarySelection].selection = XA_PRIMARY;
- lastSelectionOwner[nxagentPrimarySelection].client = NullClient;
- lastSelectionOwner[nxagentPrimarySelection].window = screenInfo.screens[0]->root->drawable.id;
- lastSelectionOwner[nxagentPrimarySelection].windowPtr = NULL;
- lastSelectionOwner[nxagentPrimarySelection].lastTimeChanged = GetTimeInMillis();
-
- lastSelectionOwner[nxagentClipboardSelection].selection = nxagentAtoms[10]; /* CLIPBOARD */
- lastSelectionOwner[nxagentClipboardSelection].client = NullClient;
- lastSelectionOwner[nxagentClipboardSelection].window = screenInfo.screens[0]->root->drawable.id;
- lastSelectionOwner[nxagentClipboardSelection].windowPtr = NULL;
- lastSelectionOwner[nxagentClipboardSelection].lastTimeChanged = GetTimeInMillis();
+ nxagentInitSelectionOwner(&lastSelectionOwner[nxagentPrimarySelection], XA_PRIMARY);
+ nxagentInitSelectionOwner(&lastSelectionOwner[nxagentClipboardSelection], nxagentAtoms[10]); /* CLIPBOARD */
#ifdef NXAGENT_TIMESTAMP
{