aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-08-22 19:37:13 +0200
committerUlrich Sibiller <uli42@gmx.de>2018-08-22 19:44:12 +0200
commitf9c2d560d40721617d5813fed8bd04af8431c75c (patch)
tree670e83bba0c6919e7e73910bd09a20f9f03bb2e1 /nx-X11/programs
parentf9e4a54c48ec9730d1e977a57dae89042e7bfb5e (diff)
downloadnx-libs-f9c2d560d40721617d5813fed8bd04af8431c75c.tar.gz
nx-libs-f9c2d560d40721617d5813fed8bd04af8431c75c.tar.bz2
nx-libs-f9c2d560d40721617d5813fed8bd04af8431c75c.zip
Fix broken 9a7c0b081fad98bfcfcceff9557781f4b39ec572
Windowsize was wrong when run with nxagent :<someDisplay>. Basically three changes: - reference sizeHints and wmHints correctly (no &) - do not use uninitialized wmHints - set wmHints Xutf8SetWMProperties() call instead of separate call
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 11efbf359..036e5b4b8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -853,8 +853,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen,
unsigned long valuemask;
XSetWindowAttributes attributes;
XWindowAttributes gattributes;
- XSizeHints* sizeHints;
- XWMHints* wmHints;
Mask mask;
Bool resetAgentPosition = False;
@@ -1870,6 +1868,9 @@ N/A
XSelectInput(nxagentDisplay, nxagentFullscreenWindow, mask);
}
+ XSizeHints* sizeHints;
+ XWMHints* wmHints;
+
if ((sizeHints = XAllocSizeHints()))
{
sizeHints->flags = PPosition | PMinSize | PMaxSize;
@@ -1898,15 +1899,6 @@ N/A
sizeHints->flags |= USSize;
}
- Xutf8SetWMProperties(nxagentDisplay,
- nxagentDefaultWindows[pScreen->myNum],
- nxagentWindowName,
- nxagentWindowName,
- argv , argc , &sizeHints, &wmHints, NULL);
-
- if (sizeHints)
- XFree(sizeHints);
-
if ((wmHints = XAllocWMHints()))
{
wmHints->icon_pixmap = nxagentIconPixmap;
@@ -1920,9 +1912,24 @@ N/A
{
wmHints->flags = IconPixmapHint;
}
+ }
- XSetWMHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], wmHints);
- XFree(wmHints);
+ Xutf8SetWMProperties(nxagentDisplay,
+ nxagentDefaultWindows[pScreen->myNum],
+ nxagentWindowName,
+ nxagentWindowName,
+ argv , argc , sizeHints, wmHints, NULL);
+
+ if (sizeHints)
+ {
+ XFree(sizeHints);
+ sizeHints = NULL;
+ }
+
+ if (wmHints)
+ {
+ XFree(wmHints);
+ wmHints = NULL;
}
/*