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;
xdisplay = XOpenDisplay( displayName.ToAscii() );
if (!xdisplay)
{
- wxLogError( _("wxWindows could not open display. Exiting.") );
+ wxLogError( _("wxWidgets could not open display. Exiting.") );
return false;
}
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
#endif
- wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
- wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
+ wxWidgetHashTable = new wxWindowHash;
+ wxClientWidgetHashTable = new wxWindowHash;
return true;
}
#endif
}
-bool wxApp::Initialized()
-{
- if (GetTopWindow())
- return TRUE;
- else
- return FALSE;
-}
-
#if !wxUSE_NANOX
//-----------------------------------------------------------------------
// X11 predicate function for exposure compression
#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,
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
}
}
return FALSE;
- break;
}
#if !wxUSE_NANOX
case PropertyNotify:
default:
//wxString eventName = wxGetXEventName(XEvent& event);
//wxLogDebug(wxT("Event %s not handled"), eventName.c_str());
+ break;
#endif // __WXDEBUG__
}
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
return parent;
else
return (Window) 0;
+#endif
}
void wxApp::Exit()
int i;
for (i = 0; i < 2; i++)
{
- bool s_inYield = FALSE;
+ static bool s_inYield = FALSE;
if ( s_inYield )
{