X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df034cc6d56382223ab05a805e740226cd253335..f3ebbc0ac81967b5ef42414ffd753905075940dd:/src/gtk/notebook.cpp?ds=sidebyside diff --git a/src/gtk/notebook.cpp b/src/gtk/notebook.cpp index 3b0b8fe5ab..fa18809974 100644 --- a/src/gtk/notebook.cpp +++ b/src/gtk/notebook.cpp @@ -736,7 +736,15 @@ int wxNotebook::HitTest(const wxPoint& pt, long *flags) const const gint y = m_widget->allocation.y; const size_t count = GetPageCount(); - for ( size_t i = 0; i < count; i++ ) + size_t i = 0; + +#ifdef __WXGTK20__ + GtkNotebook * notebook = GTK_NOTEBOOK(m_widget); + if (gtk_notebook_get_scrollable(notebook)); + i = g_list_position( notebook->children, notebook->first_tab ); +#endif + + for ( ; i < count; i++ ) { wxGtkNotebookPage* nb_page = GetNotebookPage(i); GtkWidget *box = nb_page->m_box;