aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Window.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-10 19:14:04 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-02-10 19:40:47 +0100
commit223f5548b70910a2d745b7b48d2096f29b560def (patch)
tree50855082ab270ee1369f4bf4337b66242a6612e4 /nx-X11/programs/Xserver/hw/nxagent/Window.c
parent658d07e939261da0cb4835f03ab908e16540b57c (diff)
downloadnx-libs-223f5548b70910a2d745b7b48d2096f29b560def.tar.gz
nx-libs-223f5548b70910a2d745b7b48d2096f29b560def.tar.bz2
nx-libs-223f5548b70910a2d745b7b48d2096f29b560def.zip
Wine Close Delay (108_nxagent_wine-close-delay.full.patch).
Wine close delay. Originally contributed by FreeNX team (dimbor).
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Window.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c
index 2ba37a550..c4aedf482 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Window.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c
@@ -176,6 +176,14 @@ static void nxagentReconfigureWindow(pointer, XID, pointer);
static int nxagentForceExposure(WindowPtr pWin, pointer ptr);
+/* by dimbor */
+typedef struct
+{
+ CARD32 state;
+ Window icon;
+}
+nxagentWMStateRec;
+
/*
* This is currently unused.
*/
@@ -1861,6 +1869,17 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
nxagentAddConfiguredWindow(pWin, CWStackingOrder);
nxagentAddConfiguredWindow(pWin, CW_Shape);
+ /* add by dimbor */
+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
+ {
+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True);
+ nxagentWMStateRec wmState;
+ wmState.state = 1; /* NormalState */
+ wmState.icon = None;
+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success)
+ fprintf(stderr, "nxagentRealizeWindow: Adding WM_STATE fail.\n");
+ }
+
#ifdef SHAPE
/*
@@ -1907,6 +1926,17 @@ Bool nxagentUnrealizeWindow(pWin)
return True;
}
+ /* add by dimbor */
+ if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin))
+ {
+ Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True);
+ nxagentWMStateRec wmState;
+ wmState.state = 3; /* WithdrawnState */
+ wmState.icon = None;
+ if (ChangeWindowProperty(pWin, prop, prop, 32, 0, 2, &wmState, 1) != Success)
+ fprintf(stderr, "nxagentUnRealizeWindow: Changing WM_STATE failed.\n");
+ }
+
XUnmapWindow(nxagentDisplay, nxagentWindow(pWin));
return True;