Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/sugar3/graphics/palettewindow.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index 0d67006..ff5e340 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -1155,6 +1155,18 @@ class WidgetInvoker(Invoker):
return False
def __click_event_cb(self, button):
+ event = Gtk.get_current_event()
+ if not event:
+ # not an event from a user interaction, this can be when
+ # the clicked event is emitted on a 'active' property
+ # change of ToggleToolButton for example
+ return
+ if event and button != Gtk.get_event_widget(event):
+ # another special case for the ToggleToolButton: this handles
+ # the case where we select an item and the active property
+ # of the other one changes to 'False'
+ return
+
if self.props.lock_palette and not self.locked:
self.locked = True
if hasattr(self.parent, 'set_expanded'):