This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 9937fbdf5385373c4ea2105efb3a88cac8b78a51
Author: Ulrich Sibiller <ul...@gmx.de>
Date:   Tue Apr 10 23:32:57 2018 +0200

    Screen.c: replace XSetWMNormalHints code block by already existing function
    
    nxagentSetWMNormalHints was slightly adapted therefore
---
 nx-X11/programs/Xserver/hw/nxagent/Extensions.c |  2 +-
 nx-X11/programs/Xserver/hw/nxagent/Screen.c     | 41 +++----------------------
 nx-X11/programs/Xserver/hw/nxagent/Screen.h     |  2 +-
 3 files changed, 7 insertions(+), 38 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c 
b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
index 05a4b4f..d4f195b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c
@@ -470,7 +470,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 
width, CARD16 height,
           nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0)
   {
     nxagentRandRSetWindowsSize(width, height);
-    nxagentSetWMNormalHints(pScreen -> myNum);
+    nxagentSetWMNormalHints(pScreen -> myNum, nxagentOption(Width), 
nxagentOption(Height));
   }
 
   nxagentMoveViewport(pScreen, 0, 0);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c 
b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index 6753897..b374b20 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -2281,7 +2281,6 @@ Bool nxagentResizeScreen(ScreenPtr pScreen, int width, 
int height,
                              int mmWidth, int mmHeight)
 {
   BoxRec box;
-  XSizeHints sizeHints;
   PixmapPtr pPixmap;
   char *fbBits;
   
@@ -2407,37 +2406,7 @@ FIXME: We should try to restore the previously
 
   if ((nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0))
   {
-    sizeHints.flags = PPosition | PMinSize | PMaxSize;
-    sizeHints.x = nxagentOption(X);
-    sizeHints.y = nxagentOption(Y);
-
-    sizeHints.min_width = MIN_NXAGENT_WIDTH;
-    sizeHints.min_height = MIN_NXAGENT_HEIGHT;
-    sizeHints.width = width;
-    sizeHints.height = height;
-
-    if (nxagentOption(DesktopResize) == 1)
-    {
-      sizeHints.max_width = 
WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
-      sizeHints.max_height = 
HeightOfScreen(DefaultScreenOfDisplay(nxagentDisplay));
-    }
-    else
-    {
-      sizeHints.max_width = nxagentOption(RootWidth);
-      sizeHints.max_height = nxagentOption(RootHeight);
-    }
-
-    if (nxagentUserGeometry.flag & XValue || nxagentUserGeometry.flag & YValue)
-    {
-      sizeHints.flags |= USPosition;
-    }
-
-    if (nxagentUserGeometry.flag & WidthValue || nxagentUserGeometry.flag & 
HeightValue)
-    {
-      sizeHints.flags |= USSize;
-    }
-
-    XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], 
&sizeHints);
+    nxagentSetWMNormalHints(pScreen->myNum, width, height);
 
     XResizeWindow(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], 
width, height);
 
@@ -2838,7 +2807,7 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
   {
     nxagentShadowSetWindowsSize();
 
-    nxagentSetWMNormalHints(0);
+    nxagentSetWMNormalHints(0, nxagentOption(Width), nxagentOption(Height));
   }
 
   XMapWindow(nxagentDisplay, nxagentDefaultWindows[0]);
@@ -4557,7 +4526,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr 
prgnRestore, int xorg,
   return;
 }
 
-void nxagentSetWMNormalHints(int screen)
+void nxagentSetWMNormalHints(int screen, int width, int height)
 {
   XSizeHints sizeHints;
 
@@ -4572,8 +4541,8 @@ void nxagentSetWMNormalHints(int screen)
   sizeHints.min_width = MIN_NXAGENT_WIDTH;
   sizeHints.min_height = MIN_NXAGENT_HEIGHT;
 
-  sizeHints.width = nxagentOption(Width);
-  sizeHints.height = nxagentOption(Height);
+  sizeHints.width = width;
+  sizeHints.height = height;
 
   if (nxagentOption(DesktopResize) == 1)
   {
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.h 
b/nx-X11/programs/Xserver/hw/nxagent/Screen.h
index 3df586f..416136e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.h
@@ -130,7 +130,7 @@ int nxagentShadowPoll(PixmapPtr, GCPtr, unsigned char, int, 
int, char *, int *,
 
 void nxagentShadowSetWindowsSize(void);
 
-void nxagentSetWMNormalHints(int);
+void nxagentSetWMNormalHints(int, int, int);
 
 void nxagentShadowSetRatio(float, float);
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on 
/srv/git/code.x2go.org/nx-libs.git
_______________________________________________
x2go-commits mailing list
x2go-commits@lists.x2go.org
https://lists.x2go.org/listinfo/x2go-commits

Reply via email to