ecere/gui/3D Desktop: Fixed decorations handling
authorJerome St-Louis <jerome@ecere.com>
Thu, 17 Apr 2014 04:15:28 +0000 (00:15 -0400)
committerJerome St-Louis <jerome@ecere.com>
Thu, 17 Apr 2014 04:15:28 +0000 (00:15 -0400)
ecere/src/gui/Desktop3D.ec
ecere/src/gui/Window.ec
ecere/src/gui/skins/WindowsSkin.ec

index ef1c9d1..d9e273e 100644 (file)
@@ -213,7 +213,14 @@ public bool Desktop3DUpdateDisplay()
                            window.Render(updateExtent);
 
                            FASTLIST_LOOP(updateExtent, extentBox)
-                              Update3DWindow(window, extentBox.box);
+                           {
+                              Box box
+                              {
+                                 window.clientStart.x + extentBox.box.left, window.clientStart.y + extentBox.box.top,
+                                 window.clientStart.x + extentBox.box.right, window.clientStart.y + extentBox.box.bottom
+                              };
+                              Update3DWindow(window, box);
+                           }
 
                            updateExtent.Free(null);
                         }
index c7e17c0..9523892 100644 (file)
@@ -743,7 +743,7 @@ private:
       {
          int x = absPosition.x + clientStart.x;
          int y = absPosition.y + clientStart.y;
-         if(rootWindow.nativeDecorations && rootWindow.windowHandle)
+         if(rootWindow.nativeDecorations && rootWindow.windowHandle && !is3D)
          {
             x -= rootWindow.clientStart.x;
             y -= rootWindow.clientStart.y - (rootWindow.hasMenuBar ? skinMenuHeight : 0);
@@ -791,7 +791,7 @@ private:
       {
          int x = absPosition.x;
          int y = absPosition.y;
-         if(rootWindow.nativeDecorations && rootWindow.windowHandle)
+         if(rootWindow.nativeDecorations && rootWindow.windowHandle && !is3D)
          {
             x -= rootWindow.clientStart.x;
             y -= rootWindow.clientStart.y - (rootWindow.hasMenuBar ? skinMenuHeight : 0);
@@ -2567,7 +2567,7 @@ private:
 
    void _ShowDecorations(Box box, bool post)
    {
-      if(rootWindow == this && nativeDecorations) return;
+      if(rootWindow == this && nativeDecorations && !is3D) return;
       if(visible && this != guiApp.desktop)
       {
          Surface surface = RedrawFull(box);
index b21d6b6..b1c5706 100644 (file)
@@ -185,7 +185,7 @@ public class WindowsSkin_Window : Window
          *h += statusBarHeight;
       }
 
-      if(nativeDecorations && rootWindow == this && windowHandle)
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D)
       {
 #if defined(WIN32)
          RECT rcClient = { 0 }, rcWindow = { 0 };
@@ -235,7 +235,7 @@ public class WindowsSkin_Window : Window
    void SetWindowMinimum(MinMaxValue * mw, MinMaxValue * mh)
    {
       bool isNormal = (state == normal);
-      if(nativeDecorations && rootWindow == this && windowHandle) return;
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D) return;
       if(((BorderBits)borderStyle).fixed && (state != maximized || !GetParentMenuBar()))
       {
          *mw = MIN_WIDTH;
@@ -274,10 +274,10 @@ public class WindowsSkin_Window : Window
 
       GetDecorationsSize(&aw, &ah);
 
-      if(nativeDecorations && rootWindow == this && windowHandle)
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D)
       {
 #if defined(WIN32)
-         RECT rcWindow;
+         RECT rcWindow = { 0, 0, 0, 0 };
          POINT client00 = { 0, 0 };
          ClientToScreen(windowHandle, &client00);
          GetWindowRect(windowHandle, &rcWindow);
@@ -338,7 +338,7 @@ public class WindowsSkin_Window : Window
       int top = 0, border = 0, bottom = 0;
       Window parentMenuBar = GetParentMenuBar();
 
-      if(nativeDecorations && rootWindow == this && windowHandle) return;
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D) return;
 
       if(state == minimized)
          top = border = bottom = DEAD_BORDER;
@@ -437,7 +437,7 @@ public class WindowsSkin_Window : Window
    {
       bool isNormal = (state == normal);
       bool result = false;
-      if(nativeDecorations && rootWindow == this && windowHandle) return false;
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D) return false;
 
       if(((BorderBits)borderStyle).fixed && (state != maximized || !GetParentMenuBar()))
       {
@@ -462,7 +462,7 @@ public class WindowsSkin_Window : Window
       bool result = false;
 
       *resizeX = *resizeY = *resizeEndX = *resizeEndY = false;
-      if(nativeDecorations && rootWindow == this && windowHandle) return false;
+      if(nativeDecorations && rootWindow == this && windowHandle && !is3D) return false;
 
       if(((BorderBits)borderStyle).sizable && (state == normal))
       {
@@ -500,7 +500,7 @@ public class WindowsSkin_Window : Window
       int top = 0, border = 0;
       int insideBorder = 0;
 
-      if(!nativeDecorations || rootWindow != this || !windowHandle)
+      if(!nativeDecorations || rootWindow != this || !windowHandle || is3D)
       {
          if(state == minimized)
             top = border = DEAD_BORDER;
@@ -552,7 +552,7 @@ public class WindowsSkin_Window : Window
          else
          {
             statusBar.visible = true;
-            if(nativeDecorations && rootWindow == this && windowHandle)
+            if(nativeDecorations && rootWindow == this && windowHandle && !is3D)
             {
                statusBar.anchor = { left = clientStart.x, bottom = (int)(size.h - clientSize.h - clientStart.y - statusBarHeight ) };
                statusBar.size.w = size.w - insideBorder * 2;
@@ -564,7 +564,7 @@ public class WindowsSkin_Window : Window
             }
          }
       }
-      if(!nativeDecorations || rootWindow != this || !windowHandle)
+      if(!nativeDecorations || rootWindow != this || !windowHandle || is3D)
       {
          if(sysButtons[0])
          {