aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Display.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-18 12:30:54 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-10-18 12:30:54 +0200
commit13211ec6a5060db75c93cbb4e75d017b0a49386e (patch)
treed73d06fd267eb90d707dd2106fcdffc17230074c /nx-X11/programs/Xserver/hw/nxagent/Display.c
parent7a02b4aba77a64b38992f1a20d8c851bdcc11500 (diff)
parent2d99cdd1cf5d8d0e8248d94bc07dca8ff32e4058 (diff)
downloadnx-libs-13211ec6a5060db75c93cbb4e75d017b0a49386e.tar.gz
nx-libs-13211ec6a5060db75c93cbb4e75d017b0a49386e.tar.bz2
nx-libs-13211ec6a5060db75c93cbb4e75d017b0a49386e.zip
Merge branch 'uli42-pr/window_resize_bug' into 3.6.x
Attributes GH PR #940: https://github.com/ArcticaProject/nx-libs/pull/940
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Display.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c70
1 files changed, 40 insertions, 30 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index 55e40b461..9adc67a21 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -159,6 +159,7 @@ Pixmap nxagentScreenSaverPixmap;
XlibGC nxagentBitmapGC;
+#ifdef NX_CONFINE_WINDOW
/*
* The "confine" window is used in the nxagentConstrainCursor
* procedure. We are currently overriding the original Xnest
@@ -166,6 +167,7 @@ XlibGC nxagentBitmapGC;
*/
Window nxagentConfineWindow;
+#endif
Pixmap nxagentIconPixmap;
Pixmap nxagentIconShape;
@@ -1105,6 +1107,42 @@ void nxagentResetSignalHandlers(void)
nxagentInitTimer();
}
+/*
+ * currently unused it seems
+ */
+void nxagentOpenConfineWindow(void)
+{
+#ifdef NX_CONFINE_WINDOW
+ nxagentConfineWindow = XCreateWindow(nxagentDisplay,
+ DefaultRootWindow(nxagentDisplay),
+ 0, 0, 1, 1, 0, 0,
+ InputOnly,
+ CopyFromParent,
+ 0L, NULL);
+
+ if (nxagentReportWindowIds) {
+ fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
+ nxagentConfineWindow);
+ }
+
+ #ifdef DEBUG
+ {
+ char *winname = NULL;
+ if (-1 != asprintf(&winname, "%s Confine", nxagentWindowName))
+ {
+ Xutf8SetWMProperties(nxagentDisplay, nxagentConfineWindow,
+ winname, winname, NULL , 0 , NULL, NULL, NULL);
+ SAFE_free(winname);
+ }
+ }
+ #endif
+
+ #ifdef TEST
+ fprintf(stderr, "%s: Created agent's confine window with id [0x%x].\n", __func__, nxagentConfineWindow);
+ #endif
+#endif
+}
+
void nxagentOpenDisplay(int argc, char *argv[])
{
if (!nxagentDoFullGeneration)
@@ -1298,21 +1336,7 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. We need
fprintf(stderr, "nxagentOpenDisplay: Going to create agent's confine window.\n");
#endif
- nxagentConfineWindow = XCreateWindow(nxagentDisplay,
- DefaultRootWindow(nxagentDisplay),
- 0, 0, 1, 1, 0, 0,
- InputOnly,
- CopyFromParent,
- 0L, NULL);
-
- if (nxagentReportWindowIds) {
- fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
- nxagentConfineWindow);
- }
- #ifdef TEST
- fprintf(stderr, "nxagentOpenDisplay: Created agent's confine window with id [0x%x].\n",
- nxagentConfineWindow);
- #endif
+ nxagentOpenConfineWindow();
if (!(nxagentUserGeometry.flag & XValue))
{
@@ -2665,21 +2689,7 @@ Bool nxagentReconnectDisplay(void *p0)
fprintf(stderr, "nxagentReconnectDisplay: Going to create agent's confine window.\n");
#endif
- nxagentConfineWindow = XCreateWindow(nxagentDisplay,
- DefaultRootWindow(nxagentDisplay),
- 0, 0, 1, 1, 0, 0,
- InputOnly,
- CopyFromParent,
- 0L, NULL);
-
- if (nxagentReportWindowIds) {
- fprintf(stderr, "NXAGENT_WINDOW_ID: CONFINEMENT_WINDOW,WID:[0x%x]\n",
- nxagentConfineWindow);
- }
- #ifdef TEST
- fprintf(stderr, "nxagentReconnectDisplay: Created agent's confine window with id [0x%x].\n",
- nxagentConfineWindow);
- #endif
+ nxagentOpenConfineWindow();
useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape);