extern wxList wxPendingDelete;
wxHashTable *wxWidgetHashTable = NULL;
+wxHashTable *wxClientWidgetHashTable = NULL;
wxApp *wxTheApp = NULL;
#endif
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
+ wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
wxModule::RegisterModules();
if (!wxModule::InitializeModules()) return FALSE;
delete wxWidgetHashTable;
wxWidgetHashTable = NULL;
+ delete wxClientWidgetHashTable;
+ wxClientWidgetHashTable = NULL;
wxModule::CleanUpModules();
// has been destroyed, assume a 1:1 match between
// Window and wxWindow, so if it's not in the table,
// it must have been destroyed.
-
+
win = wxGetWindowFromTable(window);
if (!win)
- return FALSE;
+ {
+#if wxUSE_TWO_WINDOWS
+ win = wxGetClientWindowFromTable(window);
+ if (!win)
+#endif
+ return FALSE;
+ }
#ifdef __WXDEBUG__
wxString windowClass = win->GetClassInfo()->GetClassName();
{
case Expose:
{
- //wxLogDebug("Expose: %s", windowClass.c_str());
- win->GetUpdateRegion().Union( XExposeEventGetX(event), XExposeEventGetY(event),
- XExposeEventGetWidth(event), XExposeEventGetHeight(event));
+#if wxUSE_TWO_WINDOWS
+ if (event->xexpose.window != (Window)win->GetClientWindow())
+ {
+ XEvent tmp_event;
+ wxExposeInfo info;
+ info.window = event->xexpose.window;
+ info.found_non_matching = FALSE;
+ while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, expose_predicate, (XPointer) &info ))
+ {
+ // Don't worry about optimizing redrawing the border etc.
+ }
+ win->NeedUpdateNcAreaInIdle();
+ }
+ else
+#endif
+ {
+ win->GetUpdateRegion().Union( XExposeEventGetX(event), XExposeEventGetY(event),
+ XExposeEventGetWidth(event), XExposeEventGetHeight(event));
- win->GetClearRegion().Union( XExposeEventGetX(event), XExposeEventGetY(event),
+ win->GetClearRegion().Union( XExposeEventGetX(event), XExposeEventGetY(event),
XExposeEventGetWidth(event), XExposeEventGetHeight(event));
#if !wxUSE_NANOX
- XEvent tmp_event;
- wxExposeInfo info;
- info.window = event->xexpose.window;
- info.found_non_matching = FALSE;
- while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, expose_predicate, (XPointer) &info ))
- {
- win->GetUpdateRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
- tmp_event.xexpose.width, tmp_event.xexpose.height );
+ XEvent tmp_event;
+ wxExposeInfo info;
+ info.window = event->xexpose.window;
+ info.found_non_matching = FALSE;
+ while (XCheckIfEvent( wxGlobalDisplay(), &tmp_event, expose_predicate, (XPointer) &info ))
+ {
+ win->GetUpdateRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
+ tmp_event.xexpose.width, tmp_event.xexpose.height );
- win->GetClearRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
- tmp_event.xexpose.width, tmp_event.xexpose.height );
- }
+ win->GetClearRegion().Union( tmp_event.xexpose.x, tmp_event.xexpose.y,
+ tmp_event.xexpose.width, tmp_event.xexpose.height );
+ }
#endif
+ if (win->GetMainWindow() == win->GetClientWindow())
+ win->NeedUpdateNcAreaInIdle();
- // Only erase background, paint in idle time.
- win->SendEraseEvents();
+ // Only erase background, paint in idle time.
+ win->SendEraseEvents();
+ //win->Update();
+ }
return TRUE;
}
if (event->update.utype == GR_UPDATE_SIZE)
#endif
{
- //wxLogDebug("ConfigureNotify: %s", windowClass.c_str());
if (win->IsTopLevel() && win->IsShown())
{
wxTopLevelWindowX11 *tlw = (wxTopLevelWindowX11 *) win;