X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd435a79ed2c79e20621fbe6b1013a86a9e05fed..a83ea9c15a7ac7bbdc6686164cfcbbc21ae5031a:/src/x11/app.cpp diff --git a/src/x11/app.cpp b/src/x11/app.cpp index 7cce82931a..5d1ab3726c 100644 --- a/src/x11/app.cpp +++ b/src/x11/app.cpp @@ -46,8 +46,8 @@ extern wxList wxPendingDelete; -wxHashTable *wxWidgetHashTable = NULL; -wxHashTable *wxClientWidgetHashTable = NULL; +wxWindowHash *wxWidgetHashTable = NULL; +wxWindowHash *wxClientWidgetHashTable = NULL; static bool g_showIconic = FALSE; static wxSize g_initialSize = wxDefaultSize; @@ -173,7 +173,7 @@ bool wxApp::Initialize(int& argc, wxChar **argv) xdisplay = XOpenDisplay( displayName.ToAscii() ); if (!xdisplay) { - wxLogError( _("wxWindows could not open display. Exiting.") ); + wxLogError( _("wxWidgets could not open display. Exiting.") ); return false; } @@ -203,8 +203,8 @@ bool wxApp::Initialize(int& argc, wxChar **argv) wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding()); #endif - wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER); - wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER); + wxWidgetHashTable = new wxWindowHash; + wxClientWidgetHashTable = new wxWindowHash; return true; } @@ -375,8 +375,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event) #if !wxUSE_NANOX case GraphicsExpose: { - printf( "GraphicExpose event\n" ); - wxLogTrace( _T("expose"), _T("GraphicsExpose from %s"), win->GetName().c_str()); win->GetUpdateRegion().Union( event->xgraphicsexpose.x, event->xgraphicsexpose.y, @@ -448,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 @@ -469,7 +466,6 @@ bool wxApp::ProcessXEvent(WXEvent* _event) } } return FALSE; - break; } #if !wxUSE_NANOX case PropertyNotify: @@ -748,7 +744,9 @@ Window wxGetWindowParent(Window window) return (Window) 0; - Window parent, root = 0; +#ifndef __VMS + // VMS chokes on unreacheable code + Window parent, root = 0; #if wxUSE_NANOX int noChildren = 0; #else @@ -769,6 +767,7 @@ Window wxGetWindowParent(Window window) return parent; else return (Window) 0; +#endif } void wxApp::Exit() @@ -788,7 +787,7 @@ bool wxApp::Yield(bool onlyIfNeeded) int i; for (i = 0; i < 2; i++) { - bool s_inYield = FALSE; + static bool s_inYield = FALSE; if ( s_inYield ) {