From ed87de315e80b0066e2dd74d07ff2ec688592072 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 22 Oct 2012 21:47:12 +0900 Subject: Fix for 1067808 : Focus issues with new gradient (and swatch) manager in Fill&Stroke (trunk) (bzr r11819) --- src/widgets/gradient-selector.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widgets/gradient-selector.cpp') diff --git a/src/widgets/gradient-selector.cpp b/src/widgets/gradient-selector.cpp index dffda69e3..65608585b 100644 --- a/src/widgets/gradient-selector.cpp +++ b/src/widgets/gradient-selector.cpp @@ -336,6 +336,14 @@ void SPGradientSelector::onTreeSelection() return; } + if (!treeview->has_focus()) { + /* Workaround for GTK bug on Windows/OS X + * When the treeview initially doesn't have focus and is clicked + * sometimes get_selection()->signal_changed() has the wrong selection + */ + treeview->grab_focus(); + } + const Glib::RefPtr sel = treeview->get_selection(); if (!sel) { return; -- cgit v1.2.3