]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/toplevel.cpp
fixed problem of deleting an entry added to an initially empty root group
[wxWidgets.git] / src / x11 / toplevel.cpp
index fdcf28a869b83167d53d98f2f4c9f24e19ec35ef..48374c9ff854c7f2320f2c7a65db5d063cb308e4 100644 (file)
@@ -248,7 +248,7 @@ wxTopLevelWindowX11::~wxTopLevelWindowX11()
     wxTopLevelWindows.DeleteObject(this);
 
     // If this is the last top-level window, exit.
     wxTopLevelWindows.DeleteObject(this);
 
     // If this is the last top-level window, exit.
-    if ( wxTheApp && (wxTopLevelWindows.Number() == 0) )
+    if ( wxTheApp && (wxTopLevelWindows.GetCount() == 0) )
     {
         wxTheApp->SetTopWindow(NULL);
 
     {
         wxTheApp->SetTopWindow(NULL);
 
@@ -677,7 +677,7 @@ bool wxSetWMDecorations(Window w, long style)
         wmProp.flags |= GR_WM_FLAGS_PROPS ;
     }
 
         wmProp.flags |= GR_WM_FLAGS_PROPS ;
     }
 
-    if (style & wxSYSTEM_MENU)
+    if (style & wxCLOSE_BOX)
     {
         wmProp.props |= GR_WM_PROPS_CLOSEBOX ;
         wmProp.flags |= GR_WM_FLAGS_PROPS ;
     {
         wmProp.props |= GR_WM_PROPS_CLOSEBOX ;
         wmProp.flags |= GR_WM_FLAGS_PROPS ;
@@ -751,10 +751,10 @@ bool wxSetWMDecorations(Window w, long style)
             hints.decorations |= MWM_DECOR_TITLE;
             
         if ((style & wxSYSTEM_MENU) != 0)
             hints.decorations |= MWM_DECOR_TITLE;
             
         if ((style & wxSYSTEM_MENU) != 0)
-        {
-            hints.functions |= MWM_FUNC_CLOSE;
             hints.decorations |= MWM_DECOR_MENU;
             hints.decorations |= MWM_DECOR_MENU;
-        }
+        
+        if ((style & wxCLOSE_BOX) != 0)
+            hints.functions |= MWM_FUNC_CLOSE;
         
         if ((style & wxMINIMIZE_BOX) != 0)
         {
         
         if ((style & wxMINIMIZE_BOX) != 0)
         {