ecere/gui/Window: Fixed wrong number of client windows when changing isActiveClient
authorJerome St-Louis <jerome@ecere.com>
Thu, 22 May 2014 14:30:37 +0000 (10:30 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 22 May 2014 14:30:37 +0000 (10:30 -0400)
- This had the rubber duck messing up the tiling/cascading of windows in the IDE

ecere/src/gui/Window.ec

index bdcb921..9b1ebce 100644 (file)
@@ -9328,7 +9328,23 @@ public:
    property bool isActiveClient
    {
       property_category $"Behavior"
-      set { style.isActiveClient = value; }
+      set
+      {
+         if(parent && style.isActiveClient != value && !style.hidden)
+         {
+            if(value)
+            {
+               if(state == minimized) parent.numIcons++;
+               parent.numPositions++;
+            }
+            else
+            {
+               if(state == minimized) parent.numIcons--;
+               parent.numPositions--;
+            }
+         }
+         style.isActiveClient = value;
+      }
       get { return style.isActiveClient; }
    };