- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (!win->m_hasVMT) return FALSE;
- if (g_blockEventsOnDrag) return FALSE;
-
- /* win is a control: tab can be propagated up */
- if ((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab))
- {
- int sel = win->GetSelection();
- wxGtkNotebookPage *page = win->GetNotebookPage(sel);
- wxCHECK_MSG( page, FALSE, _T("invalid selection in wxNotebook") );
-
- wxNavigationKeyEvent event;
- event.SetEventObject( win );
- /* 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 );
-
- wxNotebookPage *client = win->GetPage(sel);
- if ( !client->GetEventHandler()->ProcessEvent( event ) )
- {
- client->SetFocus();
- }
+ g_signal_handlers_block_by_func(widget, (void*)event_after, win);
+ g_signal_handlers_block_by_func(widget, (void*)switch_page, win);