+ 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 );
+ }
+#endif
+ if (win->GetMainWindow() == win->GetClientWindow())
+ win->NeedUpdateNcAreaInIdle();
+
+ // Only erase background, paint in idle time.
+ win->SendEraseEvents();
+ //win->Update();
+ }
+
+ return TRUE;
+ }
+
+#if !wxUSE_NANOX
+ case GraphicsExpose:
+ {
+ // wxLogDebug( "GraphicsExpose from %s", win->GetName().c_str(),
+ // event->xgraphicsexpose.x, event->xgraphicsexpose.y,
+ // event->xgraphicsexpose.width, event->xgraphicsexpose.height);
+
+ win->GetUpdateRegion().Union( event->xgraphicsexpose.x, event->xgraphicsexpose.y,
+ event->xgraphicsexpose.width, event->xgraphicsexpose.height);
+
+ win->GetClearRegion().Union( event->xgraphicsexpose.x, event->xgraphicsexpose.y,
+ event->xgraphicsexpose.width, event->xgraphicsexpose.height);
+
+ if (event->xgraphicsexpose.count == 0)
+ {
+ // Only erase background, paint in idle time.
+ win->SendEraseEvents();
+ //win->Update();
+ }
+
+ return TRUE;
+ }
+#endif
+
+ case KeyPress:
+ {
+ if (!win->IsEnabled())
+ return FALSE;
+
+ wxKeyEvent keyEvent(wxEVT_KEY_DOWN);
+ wxTranslateKeyEvent(keyEvent, win, window, event);