[pitivi] elements: Ignore ENTER/LEAVE events with a corssing mode to show/hide handles
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] elements: Ignore ENTER/LEAVE events with a corssing mode to show/hide handles
- Date: Thu, 11 Jun 2015 09:17:03 +0000 (UTC)
commit 992d0ca060e06ff07082e2d5b4a2dd78d8d0f9a1
Author: Thibault Saunier <tsaunier gnome org>
Date: Tue May 5 18:18:39 2015 +0200
elements: Ignore ENTER/LEAVE events with a corssing mode to show/hide handles
We want to show/hide the handles only when the ENTER_NOTIFY or LEAVE_NOTIFY
event are created because the mouse enter/leave the widget, meaning
event.mode == Gdk.CrossingMode.NORMAL
Fixes T56
pitivi/timeline/elements.py | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 13668fe..456a09e 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -696,11 +696,13 @@ class Clip(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
def _eventCb(self, element, event):
if event.type == Gdk.EventType.ENTER_NOTIFY:
- ui.set_children_state_recurse(self, Gtk.StateFlags.PRELIGHT)
- self.__showHandles()
+ if event.mode == Gdk.CrossingMode.NORMAL:
+ ui.set_children_state_recurse(self, Gtk.StateFlags.PRELIGHT)
+ self.__showHandles()
elif event.type == Gdk.EventType.LEAVE_NOTIFY:
- ui.unset_children_state_recurse(self, Gtk.StateFlags.PRELIGHT)
- self.__hideHandles()
+ if event.mode == Gdk.CrossingMode.NORMAL:
+ ui.unset_children_state_recurse(self, Gtk.StateFlags.PRELIGHT)
+ self.__hideHandles()
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]