]> git.saurik.com Git - wxWidgets.git/commitdiff
OR extra style with existing value or some implementations will
authorJulian Smart <julian@anthemion.co.uk>
Thu, 10 Jun 2004 13:28:31 +0000 (13:28 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Thu, 10 Jun 2004 13:28:31 +0000 (13:28 +0000)
have problems (espec. wxGTK modal dialogs closing behaviour)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

contrib/src/xrc/xmlres.cpp
src/xrc/xmlres.cpp

index b7c0bc870e25a595bda524500a995cfdd2b66505..4d6b486ad6d1d7cea64d1b73f0b620cabbd330e2 100644 (file)
@@ -1127,7 +1127,10 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
     //FIXME : add cursor
 
     if (HasParam(wxT("exstyle")))
-        wnd->SetExtraStyle(GetStyle(wxT("exstyle")));
+        // Have to OR it with existing style, since
+        // some implementations (e.g. wxGTK) use the extra style
+        // during creation
+        wnd->SetExtraStyle(wnd->GetExtraStyle() | GetStyle(wxT("exstyle")));
     if (HasParam(wxT("bg")))
         wnd->SetBackgroundColour(GetColour(wxT("bg")));
     if (HasParam(wxT("fg")))
index b7c0bc870e25a595bda524500a995cfdd2b66505..4d6b486ad6d1d7cea64d1b73f0b620cabbd330e2 100644 (file)
@@ -1127,7 +1127,10 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
     //FIXME : add cursor
 
     if (HasParam(wxT("exstyle")))
-        wnd->SetExtraStyle(GetStyle(wxT("exstyle")));
+        // Have to OR it with existing style, since
+        // some implementations (e.g. wxGTK) use the extra style
+        // during creation
+        wnd->SetExtraStyle(wnd->GetExtraStyle() | GetStyle(wxT("exstyle")));
     if (HasParam(wxT("bg")))
         wnd->SetBackgroundColour(GetColour(wxT("bg")));
     if (HasParam(wxT("fg")))