summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/ttk/ttkNotebook.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/ttk/ttkNotebook.c b/generic/ttk/ttkNotebook.c
index 83d7db9..56439a6 100644
--- a/generic/ttk/ttkNotebook.c
+++ b/generic/ttk/ttkNotebook.c
@@ -627,9 +627,12 @@ static void SelectTab(Notebook *nb, int index)
Ttk_UnmapSlave(nb->notebook.mgr, currentIndex);
}
- NotebookPlaceSlave(nb, index);
-
+ /* Must be set before calling NotebookPlaceSlave(), otherwise it may
+ * happen that NotebookPlaceSlaves(), triggered by an interveaning
+ * geometry request, will swap to old index. */
nb->notebook.currentIndex = index;
+
+ NotebookPlaceSlave(nb, index);
TtkRedisplayWidget(&nb->core);
TtkSendVirtualEvent(nb->core.tkwin, "NotebookTabChanged");