Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@laptop.org>2012-09-02 11:17:32 (GMT)
committer Simon Schampijer <simon@laptop.org>2012-09-02 11:22:34 (GMT)
commitf751ec4761934a4d7193c7b4de1ab48fba8e619a (patch)
treeb7eb3c1c89042bf9091ec3931f417662bdc9ebb2
parent5bdd4f25da8c9d253ddd70d33fb14b646f31fdd2 (diff)
CursorInvoker: check if event.mode is Gdk.CrossingMode.NORMAL to trigger a mouse leave
Like in the WidgetInvoker we check now first if the leave event has the mode Gdk.CrossingMode.NORMAL, only then we trigger a mouse leave to popdown the Palette. This stops the Palette to appear/disappear in a loop.
-rw-r--r--src/sugar3/graphics/palettewindow.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sugar3/graphics/palettewindow.py b/src/sugar3/graphics/palettewindow.py
index 1307a20..45ff543 100644
--- a/src/sugar3/graphics/palettewindow.py
+++ b/src/sugar3/graphics/palettewindow.py
@@ -1106,7 +1106,8 @@ class CursorInvoker(Invoker):
return False
def __leave_notify_event_cb(self, button, event):
- self.notify_mouse_leave()
+ if event.mode == Gdk.CrossingMode.NORMAL:
+ self.notify_mouse_leave()
return False
def __button_release_event_cb(self, button, event):