ecere: Safety for nativeDecorations of non-root windows; ide: Fixed file dialogs...
authorJerome St-Louis <jerome@ecere.com>
Sun, 14 Aug 2011 21:57:40 +0000 (17:57 -0400)
committerJerome St-Louis <jerome@ecere.com>
Sun, 14 Aug 2011 21:57:40 +0000 (17:57 -0400)
ecere/src/gui/Window.ec
ide/src/about.ec
ide/src/project/ProjectView.ec

index 0b6c254..bbc2a1c 100644 (file)
@@ -2436,7 +2436,7 @@ private:
 
    void _ShowDecorations(Box box, bool post)
    {
-      if(nativeDecorations) return;
+      if(rootWindow == this && nativeDecorations) return;
       if(visible && this != guiApp.desktop)
       {
          Surface surface = RedrawFull(box);
@@ -5540,7 +5540,7 @@ private:
       WindowState prevState = state;
 
       state = newState;
-      if(nativeDecorations)
+      if(rootWindow == this && nativeDecorations)
          return;
 
       if(prevState != newState)
@@ -9124,7 +9124,7 @@ public:
    property bool alphaBlend { get { return (bool)alphaBlend; } set { alphaBlend = value; } };
    property bool useSharedMemory { get { return (bool)useSharedMemory; } set { useSharedMemory = value; } };
    property CreationActivationOption creationActivation { get { return creationActivation; } set { creationActivation = value; } };
-   property bool nativeDecorations { get { return (bool)nativeDecorations; } set { nativeDecorations = value; } };
+   property bool nativeDecorations { get { return (bool)nativeDecorations && rootWindow == this; } set { nativeDecorations = value; } };
    property bool manageDisplay { get { return (bool)manageDisplay; } set { manageDisplay = value; } };
    
 private:
index 8bb9b8c..251ae3a 100644 (file)
@@ -6,7 +6,7 @@ import "ecere"
 
 class AboutIDE : Window
 {
-   //nativeDecorations = true;
+   nativeDecorations = true;
    text = "About the Ecere SDK";
    borderStyle = fixed;
    size = { 440, 240 };
index 904c1b3..243d2c9 100644 (file)
@@ -1530,7 +1530,7 @@ class ProjectView : Window
          //bool isRes = toNode.isInResources;
          
          FileDialog fileDialog = importFileDialog;
-         fileDialog.parent = parent;
+         fileDialog.master = parent;
          if(fileDialog.Modal() == ok)
          {
             ImportFolderFSI fsi { projectView = this };
@@ -1604,7 +1604,8 @@ class ProjectView : Window
       FileDialog fileDialog = (!resources) ? this.fileDialog : resourceFileDialog;
       fileDialog.type = multiOpen;
       fileDialog.text = !resources ? "Add Files to Project" : "Add Resources to Project";
-      fileDialog.parent = parent;
+      fileDialog.master = parent;
+
       if(fileDialog.Modal() == ok)
       {
          int c;