}
// win is a control: tab can be propagated up
- if ((!ret) && (gdk_event->keyval == GDK_Tab))
+ if ((!ret) && (gdk_event->keyval == GDK_Tab) && ((win->m_windowStyle & wxTE_PROCESS_TAB) == 0))
{
wxNavigationKeyEvent new_event;
new_event.SetDirection( !(gdk_event->state & GDK_SHIFT_MASK) );
wxCloseEvent event(wxEVT_CLOSE_WINDOW, m_windowId);
event.SetEventObject(this);
- event.SetForce(force);
+ event.SetCanVeto(!force);
- return GetEventHandler()->ProcessEvent(event);
+ (void)GetEventHandler()->ProcessEvent(event);
+
+ // when we're forced to close we do it anyhow, otherwise only if the
+ // application didn't forbid it (if the event wasn't processed, GetVeto()
+ // will return FALSE too)
+ if ( force || !event.GetVeto() )
+ Destroy();
}
bool wxWindow::Destroy()
return IsEnabled() && IsShown() && m_acceptsFocus;
}
-bool wxWindow::OnClose()
-{
- return TRUE;
-}
-
void wxWindow::AddChild( wxWindow *child )
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );
GdkWindow *window = m_wxwindow->window;
m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
gdk_window_set_background( window, m_backgroundColour.GetColor() );
- gdk_window_clear( window );
}
wxColour sysbg = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );