aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-06-10 15:27:02 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-06-11 12:04:47 +0200
commit9cb29cce25cf5d313951bbba161ffe01ed169027 (patch)
tree8dedbf9cd4973fb8ab92d201de28bb8f80f0aac5 /nx-X11
parent9739c7009513fc6e72265da40ca2e488152fbda2 (diff)
downloadnx-libs-9cb29cce25cf5d313951bbba161ffe01ed169027.tar.gz
nx-libs-9cb29cce25cf5d313951bbba161ffe01ed169027.tar.bz2
nx-libs-9cb29cce25cf5d313951bbba161ffe01ed169027.zip
Clipboard.c: more debugging output
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index 3045698ed..824c1dc47 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -1239,7 +1239,9 @@ void nxagentResetSelectionOwner(void)
{
XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime);
+ #ifdef DEBUG
fprintf(stderr, "%s: Reset clipboard state.\n", __func__);
+ #endif
lastSelectionOwner[i].client = NULL;
lastSelectionOwner[i].window = None;
@@ -1267,7 +1269,7 @@ void nxagentSetSelectionOwner(Selection *pSelection)
}
#ifdef DEBUG
- fprintf(stderr, "%s: Setting selection owner to window [0x%x].\n", __func__,
+ fprintf(stderr, "%s: Setting selection owner to serverwindow ([0x%x]).\n", __func__,
serverWindow);
#endif
@@ -1287,6 +1289,20 @@ void nxagentSetSelectionOwner(Selection *pSelection)
{
if (pSelection->selection == CurrentSelections[i].selection)
{
+ #ifdef DEBUG
+ fprintf(stderr, "%s: lastSelectionOwner.client [0x%x] -> [0x%x]\n", __func__, lastSelectionOwner[i].client, pSelection->client);
+ fprintf(stderr, "%s: lastSelectionOwner.window [0x%x] -> [0x%x]\n", __func__, lastSelectionOwner[i].window, pSelection->window);
+ fprintf(stderr, "%s: lastSelectionOwner.windowPtr [0x%x] -> [0x%x] [0x%x] (serverWindow: [0x%x])\n", __func__, lastSelectionOwner[i].windowPtr, pSelection->pWin, nxagentWindow(pSelection->pWin), serverWindow);
+ fprintf(stderr, "%s: lastSelectionOwner.lastTimeChanged [%d]\n", __func__, lastSelectionOwner[i].lastTimeChanged);
+ #endif
+
+ /*
+ * inform the real X server that our serverWindow is the
+ * clipboard owner. The real owner window (inside nxagent) is
+ * stored in lastSelectionOwner.window.
+ * lastSelectionOwner.windowPtr points to the struct that
+ * contains all information about the owner window
+ */
XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime);
lastSelectionOwner[i].client = pSelection->client;