From 9245a4eca654704efb7f03a7b293fdf757a3f978 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 8 Oct 2006 19:03:00 +0000 Subject: [PATCH] Only reorder tabs if the focus is in the tab. (#350342, Carlos Garnacho 2006-10-08 Matthias Clasen * gtk/gtknotebook.c (gtk_notebook_reorder_tab): Only reorder tabs if the focus is in the tab. (#350342, Carlos Garnacho Parro) --- ChangeLog | 6 ++++++ gtk/gtknotebook.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 9bf37b9323..eb9121a810 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-10-08 Matthias Clasen + + * gtk/gtknotebook.c (gtk_notebook_reorder_tab): Only + reorder tabs if the focus is in the tab. (#350342, Carlos + Garnacho Parro) + 2006-10-08 Tor Lillqvist * gtk/gtkmain.c (do_pre_parse_initialization): Small fix to the diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 66c44d29d9..c243977dbb 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -1231,6 +1231,9 @@ gtk_notebook_reorder_tab (GtkNotebook *notebook, GList *last, *child; gint page_num; + if (!gtk_widget_is_focus (GTK_WIDGET (notebook))) + return; + if (!notebook->cur_page || !notebook->cur_page->reorderable) return;