diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-30 16:22:25 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-30 16:22:25 +0200 |
commit | 4365fe38e67bc3d7dee3b948aefc42ca62e7a11e (patch) | |
tree | 8d46423c66f14e080ef534523c1c15032c03dc4d /nx-X11/programs/Xserver/hw/nxagent/Window.c | |
parent | 3d255540f40b7e60dfee0807216a7705a1e9682a (diff) | |
parent | 588be6386adf9dd25bb942af9456d6c07eda4676 (diff) | |
download | nx-libs-4365fe38e67bc3d7dee3b948aefc42ca62e7a11e.tar.gz nx-libs-4365fe38e67bc3d7dee3b948aefc42ca62e7a11e.tar.bz2 nx-libs-4365fe38e67bc3d7dee3b948aefc42ca62e7a11e.zip |
Merge branch 'sunweaver-pr/nx-real-wid' into 3.6.x
Attributes GH PR #463: https://github.com/ArcticaProject/nx-libs/pull/463
Reviewed by Ulrich Sibiller <uli42@gmx.de> -- Fri, 30 Jun 2017 14:16:03 +0000 (UTC)
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Window.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 23e1d5452..8d2123095 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -466,6 +466,18 @@ FIXME: Do all the windows for which nxagentWindowTopLevel(pWin) nxagentRedirectWindow(pWin); } + if ((nxagentRealWindowProp) && (!nxagentWindowTopLevel(pWin))) + { + Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); + + if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success) + fprintf(stderr, "nxagentCreateWindow: Adding NX_REAL_WINDOW failed.\n"); +#ifdef DEBUG + else + fprintf(stderr, "nxagentCreateWindow: Added NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); +#endif + } + nxagentWindowPriv(pWin)->x = pWin->origin.x - wBorderWidth(pWin); nxagentWindowPriv(pWin)->y = pWin->origin.y - wBorderWidth(pWin); nxagentWindowPriv(pWin)->width = pWin->drawable.width; @@ -2674,6 +2686,18 @@ void nxagentDisconnectWindow(void * p0, XID x1, void * p2) } #endif + if ((nxagentRealWindowProp) && (!nxagentWindowTopLevel(pWin))) + { + Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); + + if (DeleteProperty(pWin, prop) != Success) + fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW failed.\n"); +#ifdef DEBUG + else + fprintf(stderr, "nxagentDisconnectWindow: Deleting NX_REAL_WINDOW from Window ID [%x].\n", nxagentWindowPriv(pWin)->window); +#endif + } + nxagentWindow(pWin) = None; if (nxagentDrawableStatus((DrawablePtr) pWin) == NotSynchronized) @@ -3111,6 +3135,18 @@ FIXME: Do we need to set save unders attribute here? } } + if ((nxagentRealWindowProp) && (!nxagentWindowTopLevel(pWin))) + { + Atom prop = MakeAtom("NX_REAL_WINDOW", strlen("NX_REAL_WINDOW"), True); + + if (ChangeWindowProperty(pWin, prop, XA_WINDOW, 32, PropModeReplace, 1, nxagentWindowPriv(pWin), 1) != Success) + fprintf(stderr, "nxagentReconnectWindow: Updating NX_REAL_WINDOW failed.\n"); +#ifdef DEBUG + else + fprintf(stderr, "nxagentReconnectWindow: Updated NX_REAL_WINDOW for Window ID [%x].\n", nxagentWindowPriv(pWin)->window); +#endif + } + if (nxagentDrawableStatus((DrawablePtr) pWin) == NotSynchronized) { nxagentAllocateCorruptedResource((DrawablePtr) pWin, RT_NX_CORR_WINDOW); |