diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-09-23 16:36:42 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2021-06-20 20:12:50 +0200 |
commit | d2370a1ba10faffeca51d78695e8c58f4715f06e (patch) | |
tree | e87ad70c604c94f2f497f93c0079e27db0d066aa /nx-X11/programs/Xserver | |
parent | a8d09f81501b76b507f080e6a812101f6cc2ada5 (diff) | |
download | nx-libs-d2370a1ba10faffeca51d78695e8c58f4715f06e.tar.gz nx-libs-d2370a1ba10faffeca51d78695e8c58f4715f06e.tar.bz2 nx-libs-d2370a1ba10faffeca51d78695e8c58f4715f06e.zip |
Clipboard.c: rename function to better reflect meaning
Also improve Debug output.
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 29 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Clipboard.h | 2 | ||||
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 4 |
3 files changed, 15 insertions, 20 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index fefb0286e..e53b454da 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1699,10 +1699,10 @@ static void resetSelectionOwnerOnXServer(void) clearSelectionOwnerData(index); setClientSelectionStage(SelectionStageNone, index); - } - /* Hmm, this is already None when reaching this */ - lastServers[index].requestor = None; + /* Hmm, this is already None when reaching this */ + lastServers[index].requestor = None; + } } #endif @@ -1848,7 +1848,8 @@ static void setSelectionOwnerOnXServer(Selection *pSelection) setClientSelectionStage(SelectionStageNone, index); } - lastServers[index].requestor = None; + /* FIXME: commented because index is invalid here! */ + /* lastServers[index].requestor = None; */ /* FIXME @@ -2226,12 +2227,8 @@ XlibAtom translateLocalToRemoteTarget(Atom local) * selection. When there is an owner, it should be generated by the * owner of the selection by using XSendEvent()." */ -int nxagentSendNotify(xEvent *event) +int nxagentSendNotificationToSelfViaXServer(xEvent *event) { - #ifdef DEBUG - fprintf(stderr, "%s: Got called.\n", __func__); - #endif - if (!agentClipboardInitialized) { #ifdef DEBUG @@ -2241,13 +2238,11 @@ int nxagentSendNotify(xEvent *event) } #ifdef DEBUG - fprintf(stderr, "%s: property is [%d][%s].\n", __func__, - event->u.selectionNotify.property, - NameForAtom(event->u.selectionNotify.property)); - fprintf(stderr, "%s: selection is [%d][%s].\n", __func__, - event->u.selectionNotify.selection, - NameForAtom(event->u.selectionNotify.selection)); - fprintf(stderr, "%s: requestor is [0x%x].\n", __func__, event->u.selectionNotify.requestor); + fprintf(stderr, "%s: Received SendNotify by client: property [%d][%s] target [%d][%s] selection [%d][%s] requestor [0x%x] time [%u].\n", __func__, + event->u.selectionNotify.property, NameForAtom(event->u.selectionNotify.property), + event->u.selectionNotify.target, NameForAtom(event->u.selectionNotify.target), + event->u.selectionNotify.selection, NameForAtom(event->u.selectionNotify.selection), + event->u.selectionNotify.requestor, event->u.selectionNotify.time); #endif int index = nxagentFindCurrentSelectionIndex(event->u.selectionNotify.selection); @@ -2403,7 +2398,7 @@ Bool nxagentInitClipboard(WindowPtr pWin) /* * Server side properties to hold pasted data. - * see nxagentSendNotify for an explanation + * see nxagentSendNotificationToSelfViaXServer for an explanation */ serverTransFromAgentProperty = nxagentAtoms[15]; /* NX_SELTRANS_FROM_AGENT */ serverTransToAgentProperty = nxagentAtoms[5]; /* NX_CUT_BUFFER_SERVER */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h index f902bb50b..aca8d94af 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h @@ -76,7 +76,7 @@ extern Bool nxagentCollectPropertyEventFromXServer(int resource); extern WindowPtr nxagentGetClipboardWindow(Atom property); -extern int nxagentSendNotify(xEvent *event); +extern int nxagentSendNotificationToSelfViaXServer(xEvent *event); extern void nxagentDumpClipboardStat(void); diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index fccc718b0..50ecef09b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -433,8 +433,8 @@ ProcSendEvent(ClientPtr client) if (stuff -> event.u.u.type == SelectionNotify) { - if (nxagentSendNotify(&stuff->event) == 1) - return Success; + if (nxagentSendNotificationToSelfViaXServer(&stuff->event) == 1) + return Success; } #endif return xorg_ProcSendEvent(client); |