]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/app.cpp
Add import/export attributes
[wxWidgets.git] / src / x11 / app.cpp
index 9a5fff8ef2cfa8136323bb83ed78db81d879d08d..5288ac730382510507401844bc5db867ac5c31aa 100644 (file)
@@ -446,16 +446,15 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
             if (event->update.utype == GR_UPDATE_SIZE)
 #endif
             {
-                if (win->IsTopLevel())
+                wxTopLevelWindow *tlw = wxDynamicCast(win, wxTopLevelWindow);
+                if ( tlw )
                 {
-                    wxTopLevelWindow *tlw = (wxTopLevelWindow*) win;
                     tlw->SetConfigureGeometry( XConfigureEventGetX(event), XConfigureEventGetY(event),
                         XConfigureEventGetWidth(event), XConfigureEventGetHeight(event) );
                 }
 
-                if (win->IsTopLevel() && win->IsShown())
+                if ( tlw && tlw->IsShown() )
                 {
-                    wxTopLevelWindowX11 *tlw = (wxTopLevelWindowX11 *) win;
                     tlw->SetNeedResizeInIdle();
                 }
                 else
@@ -467,7 +466,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event)
                 }
             }
             return FALSE;
-            break;
         }
 #if !wxUSE_NANOX
         case PropertyNotify:
@@ -692,7 +690,9 @@ bool wxApp::OnInitGui()
 
 #include <pango/pango.h>
 #include <pango/pangox.h>
-#include <pango/pangoxft.h>
+#ifdef HAVE_PANGO_XFT
+    #include <pango/pangoxft.h>
+#endif
 
 PangoContext* wxApp::GetPangoContext()
 {
@@ -702,7 +702,7 @@ PangoContext* wxApp::GetPangoContext()
 
     Display *xdisplay = (Display*) wxApp::GetDisplay();
 
-#if 1
+#ifdef HAVE_PANGO_XFT
     int xscreen = DefaultScreen(xdisplay);
     static int use_xft = -1;
     if (use_xft == -1)