diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-08-10 00:50:27 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-08-10 23:48:09 +0200 |
commit | 715fcfe6dfc2be12eb6673d2a5e5672af18f9291 (patch) | |
tree | 6bfdeb4cf99ec22f0a6fe60ff7a9e9a792105156 /nx-X11/programs/Xserver/hw/nxagent/Window.c | |
parent | 8235925a2c3599a8980ce789e0a79369118727fe (diff) | |
download | nx-libs-715fcfe6dfc2be12eb6673d2a5e5672af18f9291.tar.gz nx-libs-715fcfe6dfc2be12eb6673d2a5e5672af18f9291.tar.bz2 nx-libs-715fcfe6dfc2be12eb6673d2a5e5672af18f9291.zip |
Set NX_AGENT_VERSION property for root window
Fixes ArcticaProject/nx-libs#500
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 4cefd3f16..9afef8a0c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -532,6 +532,22 @@ FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) return True; } +/* set the NX_AGENT_VERSION property for the given window (normally + the root window) */ +void nxagentSetVersionProperty(WindowPtr pWin) +{ + char *name = "NX_AGENT_VERSION"; + + Atom prop = MakeAtom(name, strlen(name), True); + + if (ChangeWindowProperty(pWin, prop, XA_STRING, 8, PropModeReplace, strlen(NX_VERSION_CURRENT_STRING), NX_VERSION_CURRENT_STRING, True) != Success) + fprintf(stderr, "%s: Adding propery [%s], value [%s] failed.\n", __func__, name, NX_VERSION_CURRENT_STRING); +#ifdef DEBUG + else + fprintf(stderr, "%s: Added property [%s], value [%s] for root window [%x].\n", __func__, name, NX_VERSION_CURRENT_STRING, pWin); +#endif +} + Bool nxagentSomeWindowsAreMapped() { WindowPtr pWin = screenInfo.screens[0]->root -> firstChild; |