[pitivi] viewer: Fix viewer appearing over title clips



commit 395bfe10b488c7a02e5cc91f18f43383a36f1972
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Mar 12 02:19:39 2019 +0100

    viewer: Fix viewer appearing over title clips

 pitivi/viewer/overlay_stack.py | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/pitivi/viewer/overlay_stack.py b/pitivi/viewer/overlay_stack.py
index e1389d10..816b3c69 100644
--- a/pitivi/viewer/overlay_stack.py
+++ b/pitivi/viewer/overlay_stack.py
@@ -36,6 +36,7 @@ class OverlayStack(Gtk.Overlay, Loggable):
         self.__overlays = {}
         self.__visible_overlays = []
         self.__hide_all_overlays = False
+        self.__last_allocation = None
         self.app = app
         self.window_size = numpy.array([1, 1])
         self.click_position = None
@@ -188,6 +189,12 @@ class OverlayStack(Gtk.Overlay, Loggable):
         self.__show_resize_status = enabled
 
     def __sink_widget_size_allocate_cb(self, unused_widget, allocation):
+        previous_allocation = self.__last_allocation
+        self.__last_allocation = (allocation.width, allocation.height)
+        if previous_allocation == self.__last_allocation:
+            # The allocation did not actually change. Ignore the event.
+            return
+
         if not self.__show_resize_status:
             return
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]