[X2Go-Commits] [nx-libs] 14/108: Fix broken 9a7c0b081fad98bfcfcceff9557781f4b39ec572
git-admin at x2go.org
git-admin at x2go.org
Fri Nov 9 20:35:33 CET 2018
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository nx-libs.
commit f9c2d560d40721617d5813fed8bd04af8431c75c
Author: Ulrich Sibiller <uli42 at gmx.de>
Date: Wed Aug 22 19:37:13 2018 +0200
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
---
nx-X11/programs/Xserver/hw/nxagent/Screen.c | 33 +++++++++++++++++------------
1 file 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 11efbf3..036e5b4 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;
}
/*
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
More information about the x2go-commits
mailing list