aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-11-17 18:00:55 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-01-05 23:36:02 +0100
commitb2af0c68602652b8d35a1d303eaa0a9a41285a2e (patch)
tree0ea329b956ac25f0d83cc4cb1821ac85aca982cd
parentfa7fb7499fdf3625e28eb018a5ee9748d4b69dfe (diff)
downloadnx-libs-b2af0c68602652b8d35a1d303eaa0a9a41285a2e.tar.gz
nx-libs-b2af0c68602652b8d35a1d303eaa0a9a41285a2e.tar.bz2
nx-libs-b2af0c68602652b8d35a1d303eaa0a9a41285a2e.zip
Clipboard: make nxagentInitClipboard return a Boolean
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.c12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Clipboard.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c2
3 files changed, 10 insertions, 6 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
index f8383ccd9..2b8a6f9b0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
@@ -2062,7 +2062,11 @@ WindowPtr nxagentGetClipboardWindow(Atom property)
}
}
-int nxagentInitClipboard(WindowPtr pWin)
+/*
+ * Initialize the clipboard
+ * Returns: True for success else False
+ */
+Bool nxagentInitClipboard(WindowPtr pWin)
{
Window iWindow = nxagentWindow(pWin);
@@ -2111,7 +2115,7 @@ int nxagentInitClipboard(WindowPtr pWin)
fprintf(stderr, "%s: PANIC! Could not create NX_CUT_BUFFER_SERVER atom\n", __func__);
#endif
- return -1;
+ return False;
}
#ifdef TEST
@@ -2208,7 +2212,7 @@ int nxagentInitClipboard(WindowPtr pWin)
"Could not create NX_CUT_BUFFER_CLIENT atom.\n", __func__);
#endif
- return -1;
+ return False;
}
}
@@ -2225,5 +2229,5 @@ int nxagentInitClipboard(WindowPtr pWin)
}
#endif
- return 1;
+ return True;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
index c2e783cb9..e63513a4c 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.h
@@ -47,7 +47,7 @@ extern XFixesAgentInfoRec nxagentXFixesInfo;
* data with the X server.
*/
-extern int nxagentInitClipboard(WindowPtr pWindow);
+extern Bool nxagentInitClipboard(WindowPtr pWindow);
/*
* Called whenever a client or a window is
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index aa8831055..0d36c7960 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -2802,7 +2802,7 @@ Bool nxagentReconnectAllWindows(void *p0)
fprintf(stderr, "nxagentReconnectAllWindows: All windows reconfigured.\n");
#endif
- if (nxagentInitClipboard(screenInfo.screens[0]->root) == -1)
+ if (!nxagentInitClipboard(screenInfo.screens[0]->root))
{
#ifdef WARNING
fprintf(stderr, "nxagentReconnectAllWindows: WARNING! Couldn't initialize the clipboard.\n");