[gnome-shell] windowManager: Avoid reentrancy on the ::size-changed handler



commit a82c564a73cb3e77a07d44fe8bbfe5837aef2c5d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jan 25 17:47:18 2017 +0100

    windowManager: Avoid reentrancy on the ::size-changed handler
    
    We have no guarantees on the number of ::size-changed signals that we may
    receive, so the _sizeChangedWindow handler may run multiple times, which
    leads to multiple calls to meta_plugin_size_change_completed(). So double
    check the actor is not already being animated in the _sizeChangedWindow
    handler to avoid reentrancy.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777784

 js/ui/windowManager.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index eb7716a..551c335 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -1286,6 +1286,8 @@ const WindowManager = new Lang.Class({
     _sizeChangedWindow: function(shellwm, actor) {
         if (!actor.__fullscreenInfo)
             return;
+        if (this._resizing.indexOf(actor) != -1)
+            return;
 
         let actorClone = actor.__fullscreenInfo.clone;
         let targetRect = actor.meta_window.get_frame_rect();


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