ecere/gui/drivers/XInterface: Fixed out of sync button actions on non-native decorations
authorJerome St-Louis <jerome@ecere.com>
Sat, 8 Feb 2014 14:04:32 +0000 (21:04 +0700)
committerJerome St-Louis <jerome@ecere.com>
Sun, 9 Feb 2014 03:39:25 +0000 (10:39 +0700)
ecere/src/gui/drivers/XInterface.ec

index 754b3c2..70592ff 100644 (file)
@@ -1871,15 +1871,29 @@ class XInterface : Interface
                         if(maxVert && maxHorz)
                         {
                            if(window.state != maximized)
+                           {
                               *&window.state = maximized;
+                              if(!window.nativeDecorations)
+                                 window.CreateSystemChildren();
+                           }
                         }
                         else if(isMinimized)
                         {
                            if(window.state != minimized)
+                           {
                               *&window.state = minimized;
+                              if(!window.nativeDecorations)
+                                 window.CreateSystemChildren();
+                           }
                         }
                         else if(window.state != normal)
+                        {
+                           if(window.state == maximized)
+                              unmaximized = true;
                            *&window.state = normal;
+                           if(!window.nativeDecorations)
+                              window.CreateSystemChildren();
+                        }
                      }
                   }
                   {