X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80a58c9968cc740b50fb92cd95d6a014a1c6e9bf..79f585d90388128f9d245f7c92d3013b98b9ed14:/src/gtk/notebook.cpp?ds=sidebyside diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 2d4ed460a5..4fbff0c3df 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -178,6 +178,7 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk /* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */ event.SetDirection( (gdk_event->keyval == GDK_Tab) ); /* CTRL-TAB changes the (parent) window, i.e. switch notebook page */ + event.SetWindowChange( (gdk_event->state & GDK_CONTROL_MASK) ); event.SetCurrentFocus( win ); if (!page->m_client->GetEventHandler()->ProcessEvent( event )) { @@ -357,6 +358,10 @@ int wxNotebook::SetSelection( int page ) int selOld = GetSelection(); gtk_notebook_set_page( GTK_NOTEBOOK(m_widget), page ); + + wxGtkNotebookPage* g_page = GetNotebookPage( page ); + if (g_page->m_client) + g_page->m_client->SetFocus(); return selOld; } @@ -647,6 +652,8 @@ wxNotebookPage *wxNotebook::GetPage( int page ) const return nb_page->m_client; } +#if wxUSE_CONSTRAINTS + // override these 2 functions to do nothing: everything is done in OnSize void wxNotebook::SetConstraintSizes( bool WXUNUSED(recurse) ) { @@ -659,6 +666,8 @@ bool wxNotebook::DoPhase( int WXUNUSED(nPhase) ) return TRUE; } +#endif + void wxNotebook::ApplyWidgetStyle() { // TODO, font for labels etc