Marco Trevisan (Treviño) has proposed merging 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master.

Requested reviews:
  Ubuntu Desktop (ubuntu-desktop)

For more details, see:
https://code.launchpad.net/~3v1n0/ubuntu/+source/gnome-shell/+git/gnome-shell/+merge/350754
-- 
Your team Ubuntu Desktop is requested to review the proposed merge of 
~3v1n0/ubuntu/+source/gnome-shell:ubuntu/master into 
~ubuntu-desktop/ubuntu/+source/gnome-shell:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index f6217f3..44bce33 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+gnome-shell (3.28.3-0ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/patch/js-fix-invalid-access-errors.patch:
+    - Updated to include upstream requested changes
+  * debian/patches/workspace-fix-repositioned-windows-in-activities.patch:
+    - Cherry-pick from upstream 3.28 branch
+
+ -- Marco Trevisan (Treviño) <ma...@ubuntu.com>  Wed, 25 Jul 2018 01:40:50 +0200
+
 gnome-shell (3.28.3-0ubuntu1) cosmic; urgency=medium
 
   * debian/patches/30-remoteMenu-Prevent-the-shell-from-becoming-unrespons.patch,
diff --git a/debian/patches/js-fix-invalid-access-errors.patch b/debian/patches/js-fix-invalid-access-errors.patch
index c86fc8b..a272d79 100644
--- a/debian/patches/js-fix-invalid-access-errors.patch
+++ b/debian/patches/js-fix-invalid-access-errors.patch
@@ -24,47 +24,37 @@ Remove duplicated handler on 'destroy' and just use a generic one.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=791233
 
-workspaceThumbnail: Disconnect from window signals on destruction
-
-Avoid to try to destroy the window clone content more than once
-when a window is destroyed, and do it in proper order.
+automountManager: remove allowAutorun expire timeout on volume removal
+    
+If the volume is removed before AUTORUN_EXPIRE_TIMEOUT_SECS seconds, we can stop
+the timeout earlier as there's nothing to unset, while the volume instance
+won't be valid anymore.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=791233
 
-workspaceThumbnail: Remove WindowClone's from _windows when destroyed
-
-A WindowClone might be destroyed earlier than its MetaWindow counterpart
-as its WindowActor could be destroyed earlier, thus when happens it's safer
-to remove the clone from the windows list, without waiting for the workspace
-to request to do so.
+messageList: stop syncing if closeButton has been destroyed
 
-WindowClone now emits a 'destroy' signals earlier enough and this now
-triggers a _doRemoveWindow on WorkspaceThumbnail which will lead
-to the proper cleanup; keeping track of the signal connections, in
-order to avoid callback loops (not really harmful in this case, but
-good practice).
+The _sync function for Message only updates the close button visibility,
+so we can safely stop doing that if the close button get get destroyed earlier
+(as it happens when clicking on it).
 
 https://bugzilla.gnome.org/show_bug.cgi?id=791233
 
-workspace: Disconnect from window signals on destruction
+workspaceThumbnail: Don't keep stale clones in list
 
-Avoid to try to destroy the window clone content more than once
-when a window is destroyed, and do it in proper order.
+If a clone gets destroyed before the corresponding MetaWindow is
+removed from the workspace, we will still find it in the list of
+clones and try to destroy it again. Avoid the resulting warnings
+by updating the list of clones immediately when a clone is destroyed.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=791233
 
-workspace: Remove WindowClone's from _windows when destroyed
-
-A WindowClone might be destroyed earlier than its MetaWindow counterpart
-as its WindowActor could be destroyed earlier, thus when happens it's safer
-to remove the clone from the windows list, without waiting for the workspace
-to request to do so.
+workspace: Don't keep stale clones in list
 
-WindowClone now emits a 'destroy' signals earlier enough and this now
-triggers a _doRemoveWindow on WorkspaceThumbnail which will lead
-to the proper cleanup; keeping track of the signal connections, in
-order to avoid callback loops (not really harmful in this case, but
-good practice).
+If a clone gets destroyed before the corresponding MetaWindow is
+removed from the workspace, we will still find it in the list of
+clones and try to destroy it again. Avoid the resulting warnings
+by updating the list of clones immediately when a clone is destroyed.
 
 https://bugzilla.gnome.org/show_bug.cgi?id=791233
 
@@ -72,12 +62,52 @@ Bug-GNOME: https://bugzilla.gnome.org/show_bug.cgi?id=791233
 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/bionic/+source/gnome-shell/+bug/1747566
 Forwarded: yes, https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/4
 ---
- js/ui/dnd.js                | 65 +++++++++++++++++++++++++++------------------
- js/ui/tweener.js            | 64 +++++++++++++++++++++++++++++++++++---------
- js/ui/workspace.js          | 26 +++++++++++-------
- js/ui/workspaceThumbnail.js | 21 ++++++++++-----
- 4 files changed, 122 insertions(+), 54 deletions(-)
+ js/ui/calendar.js                    |  2 ++
+ js/ui/components/automountManager.js |  6 ++++
+ js/ui/dnd.js                         | 65 +++++++++++++++++++++---------------
+ js/ui/messageList.js                 |  3 +-
+ js/ui/tweener.js                     | 63 ++++++++++++++++++++++++++--------
+ 5 files changed, 99 insertions(+), 40 deletions(-)
 
+diff --git a/js/ui/calendar.js b/js/ui/calendar.js
+index 651aac6..fd133cc 100644
+--- a/js/ui/calendar.js
++++ b/js/ui/calendar.js
+@@ -802,6 +802,8 @@ var NotificationMessage = new Lang.Class({
+     },
+ 
+     _onDestroy() {
++        this.parent();
++
+         if (this._updatedId)
+             this.notification.disconnect(this._updatedId);
+         this._updatedId = 0;
+diff --git a/js/ui/components/automountManager.js b/js/ui/components/automountManager.js
+index 2d8f3f8..a6cd857 100644
+--- a/js/ui/components/automountManager.js
++++ b/js/ui/components/automountManager.js
+@@ -210,6 +210,10 @@ var AutomountManager = new Lang.Class({
+     },
+ 
+     _onVolumeRemoved(monitor, volume) {
++        if (volume._allowAutorunExpireId && volume._allowAutorunExpireId > 0) {
++            Mainloop.source_remove(volume._allowAutorunExpireId);
++            delete volume._allowAutorunExpireId;
++        }
+         this._volumeQueue = 
+             this._volumeQueue.filter(element => (element != volume));
+     },
+@@ -234,8 +238,10 @@ var AutomountManager = new Lang.Class({
+     _allowAutorunExpire(volume) {
+         let id = Mainloop.timeout_add_seconds(AUTORUN_EXPIRE_TIMEOUT_SECS, () => {
+             volume.allowAutorun = false;
++            delete volume._allowAutorunExpireId;
+             return GLib.SOURCE_REMOVE;
+         });
++        volume._allowAutorunExpireId = id;
+         GLib.Source.set_name_by_id(id, '[gnome-shell] volume.allowAutorun');
+     }
+ });
 diff --git a/js/ui/dnd.js b/js/ui/dnd.js
 index a38607c..431c60d 100644
 --- a/js/ui/dnd.js
@@ -275,11 +305,25 @@ index a38607c..431c60d 100644
          currentDraggable = null;
      }
  });
+diff --git a/js/ui/messageList.js b/js/ui/messageList.js
+index aff201e..2d397c1 100644
+--- a/js/ui/messageList.js
++++ b/js/ui/messageList.js
+@@ -362,7 +362,8 @@ var Message = new Lang.Class({
+         this.setBody(body);
+ 
+         this._closeButton.connect('clicked', this.close.bind(this));
+-        this.actor.connect('notify::hover', this._sync.bind(this));
++        let actorHoverId = this.actor.connect('notify::hover', this._sync.bind(this));
++        this._closeButton.connect('destroy', this.actor.disconnect.bind(this.actor, actorHoverId));
+         this.actor.connect('clicked', this._onClicked.bind(this));
+         this.actor.connect('destroy', this._onDestroy.bind(this));
+         this._sync();
 diff --git a/js/ui/tweener.js b/js/ui/tweener.js
-index 1a85e2f..663b97b 100644
+index 1a85e2f..22818ba 100644
 --- a/js/ui/tweener.js
 +++ b/js/ui/tweener.js
-@@ -69,30 +69,68 @@ function _getTweenState(target) {
+@@ -69,30 +69,67 @@ function _getTweenState(target) {
      return target.__ShellTweenerState;
  }
  
@@ -320,8 +364,7 @@ index 1a85e2f..663b97b 100644
 +    let wrapperNeeded = false;
 +    let tweenerHandlers = _ensureHandlers(target);
 +
-+    if (!(name in tweenerHandlers))
-+    {
++    if (!(name in tweenerHandlers)) {
 +        tweenerHandlers[name] = [];
 +        wrapperNeeded = true;
 +    }
@@ -361,137 +404,3 @@ index 1a85e2f..663b97b 100644
  }
  
  function _actorDestroyed(target) {
-diff --git a/js/ui/workspace.js b/js/ui/workspace.js
-index 8b56932..c148ccb 100644
---- a/js/ui/workspace.js
-+++ b/js/ui/workspace.js
-@@ -139,14 +139,8 @@ var WindowClone = new Lang.Class({
- 
-         this._windowClone._updateId = this.metaWindow.connect('size-changed',
-             this._onRealWindowSizeChanged.bind(this));
--        this._windowClone._destroyId =
--            this.realWindow.connect('destroy', () => {
--                // First destroy the clone and then destroy everything
--                // This will ensure that we never see it in the
--                // _disconnectSignals loop
--                this._windowClone.destroy();
--                this.destroy();
--            });
-+        this._windowClone._destroyId = this.realWindow.connect('destroy',
-+            this.destroy.bind(this));
- 
-         this._updateAttachedDialogs();
-         this._computeBoundingBox();
-@@ -310,6 +304,14 @@ var WindowClone = new Lang.Class({
-     },
- 
-     destroy() {
-+        this.emit('destroy');
-+
-+        // First destroy the clone and then destroy everything
-+        // This will ensure that we never see it in the _disconnectSignals loop
-+        this.metaWindow.disconnect(this._windowClone._updateId);
-+        this.realWindow.disconnect(this._windowClone._destroyId);
-+        this._windowClone.destroy();
-+
-         this.actor.destroy();
-     },
- 
-@@ -1131,6 +1133,7 @@ var Workspace = new Lang.Class({
-         // Create clones for windows that should be
-         // visible in the Overview
-         this._windows = [];
-+        this._windowsDestroyedIds = [];
-         this._windowOverlays = [];
-         for (let i = 0; i < windows.length; i++) {
-             if (this._isOverviewWindow(windows[i])) {
-@@ -1428,7 +1431,7 @@ var Workspace = new Lang.Class({
-         return GLib.SOURCE_REMOVE;
-     },
- 
--    _doRemoveWindow(metaWin) {
-+    _doRemoveWindow(metaWin, {cloneDestroy}={cloneDestroy: true}) {
-         let win = metaWin.get_compositor_private();
- 
-         let clone = this._removeWindowClone(metaWin);
-@@ -1792,7 +1795,11 @@ var Workspace = new Lang.Class({
-             this._actualGeometryLater = 0;
-         }
- 
-+        for (let index = 0; index < this._windows.length; ++index)
-+            this._windows[index].disconnect(this._windowsDestroyedIds[index]);
-+
-         this._windows = [];
-+        this._windowsDestroyedIds = [];
-     },
- 
-     // Sets this.leavingOverview flag to false.
-@@ -1859,6 +1866,7 @@ var Workspace = new Lang.Class({
-             clone.setStackAbove(this._windows[this._windows.length - 1].actor);
- 
-         this._windows.push(clone);
-+        this._windowsDestroyedIds.push(cloneDestroyedId);
-         this._windowOverlays.push(overlay);
- 
-         return [clone, overlay];
-diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
-index 381169e..016dda6 100644
---- a/js/ui/workspaceThumbnail.js
-+++ b/js/ui/workspaceThumbnail.js
-@@ -70,12 +70,7 @@ var WindowClone = new Lang.Class({
- 
-         this.clone._updateId = this.metaWindow.connect('position-changed',
-                                                        this._onPositionChanged.bind(this));
--        this.clone._destroyId = this.realWindow.connect('destroy', () => {
--            // First destroy the clone and then destroy everything
--            // This will ensure that we never see it in the _disconnectSignals loop
--            this.clone.destroy();
--            this.destroy();
--        });
-+        this.clone._destroyId = this.realWindow.connect('destroy', this.destroy.bind(this));
-         this._onPositionChanged();
- 
-         this.actor.connect('button-release-event',
-@@ -142,6 +137,14 @@ var WindowClone = new Lang.Class({
-     },
- 
-     destroy() {
-+        this.emit('destroy');
-+
-+        // First destroy the clone and then destroy everything
-+        // This will ensure that we never see it in the _disconnectSignals loop
-+        this.metaWindow.disconnect(this.clone._updateId);
-+        this.realWindow.disconnect(this.clone._destroyId);
-+        this.clone.destroy();
-+
-         this.actor.destroy();
-     },
- 
-@@ -285,6 +288,7 @@ var WorkspaceThumbnail = new Lang.Class({
- 
-         // Create clones for windows that should be visible in the Overview
-         this._windows = [];
-+        this._windowsDestroyedIds = [];
-         this._allWindows = [];
-         this._minimizedChangedIds = [];
-         for (let i = 0; i < windows.length; i++) {
-@@ -493,7 +497,11 @@ var WorkspaceThumbnail = new Lang.Class({
-           this._bgManager = null;
-         }
- 
-+        for (let index = 0; index < this._windows.length; ++index)
-+            this._windows[index].disconnect(this._windowsDestroyedIds[index]);
-+
-         this._windows = [];
-+        this._windowsDestroyedIds = [];
-         this.actor = null;
-     },
- 
-@@ -537,6 +545,7 @@ var WorkspaceThumbnail = new Lang.Class({
-             clone.setStackAbove(this._windows[this._windows.length - 1].actor);
- 
-         this._windows.push(clone);
-+        this._windowsDestroyedIds.push(cloneDestroyedId);
- 
-         return clone;
-     },
diff --git a/debian/patches/workspace-fix-repositioned-windows-in-activities.patch b/debian/patches/workspace-fix-repositioned-windows-in-activities.patch
index 5ff0ae2..7da103a 100644
--- a/debian/patches/workspace-fix-repositioned-windows-in-activities.patch
+++ b/debian/patches/workspace-fix-repositioned-windows-in-activities.patch
@@ -20,12 +20,12 @@ Bug-GNOME: https://bugzilla.gnome.org/show_bug.cgi?id=776588
 Bug-Ubuntu: https://bugs.launchpad.net/gnome-shell/+bug/1653153
 Forwarded: yes, https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/8
 ---
- js/ui/workspace.js          | 28 +++++++++++++++-------------
- js/ui/workspaceThumbnail.js |  9 ++++-----
- 2 files changed, 19 insertions(+), 18 deletions(-)
+ js/ui/workspace.js          | 25 +++++++++++++------------
+ js/ui/workspaceThumbnail.js |  7 +++----
+ 2 files changed, 16 insertions(+), 16 deletions(-)
 
 diff --git a/js/ui/workspace.js b/js/ui/workspace.js
-index 8836537..f06b78e 100644
+index 8b56932..112c54e 100644
 --- a/js/ui/workspace.js
 +++ b/js/ui/workspace.js
 @@ -137,8 +137,10 @@ var WindowClone = new Lang.Class({
@@ -38,10 +38,10 @@ index 8836537..f06b78e 100644
 +            this._onMetaWindowSizeChanged.bind(this));
 +        this._windowClone._posChangedId = this.metaWindow.connect('position-changed',
 +            this._computeBoundingBox.bind(this));
-         this._windowClone._destroyId = this.realWindow.connect('destroy',
-             this.destroy.bind(this));
- 
-@@ -200,8 +202,7 @@ var WindowClone = new Lang.Class({
+         this._windowClone._destroyId =
+             this.realWindow.connect('destroy', () => {
+                 // First destroy the clone and then destroy everything
+@@ -206,8 +208,7 @@ var WindowClone = new Lang.Class({
  
      addAttachedDialog(win) {
          this._doAddAttachedDialog(win, win.get_compositor_private());
@@ -51,7 +51,7 @@ index 8836537..f06b78e 100644
      },
  
      hasAttachedDialogs() {
-@@ -210,15 +211,14 @@ var WindowClone = new Lang.Class({
+@@ -216,15 +217,14 @@ var WindowClone = new Lang.Class({
  
      _doAddAttachedDialog(metaWin, realWin) {
          let clone = new Clutter.Clone({ source: realWin });
@@ -68,21 +68,11 @@ index 8836537..f06b78e 100644
  
 -            this._computeBoundingBox();
 -            this.emit('size-changed');
-+            this._onMetaWindowSizeChanged.bind(this);
++            this._onMetaWindowSizeChanged();
          });
          this.actor.add_child(clone);
      },
-@@ -308,7 +308,8 @@ var WindowClone = new Lang.Class({
- 
-         // First destroy the clone and then destroy everything
-         // This will ensure that we never see it in the _disconnectSignals loop
--        this.metaWindow.disconnect(this._windowClone._updateId);
-+        this.metaWindow.disconnect(this._windowClone._sizeChangedId);
-+        this.metaWindow.disconnect(this._windowClone._posChangedId);
-         this.realWindow.disconnect(this._windowClone._destroyId);
-         this._windowClone.destroy();
- 
-@@ -323,12 +324,13 @@ var WindowClone = new Lang.Class({
+@@ -321,12 +321,13 @@ var WindowClone = new Lang.Class({
              else
                  realWindow = child.source;
  
@@ -99,7 +89,7 @@ index 8836537..f06b78e 100644
          this.emit('size-changed');
      },
 diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
-index 0c72e74..4db8c19 100644
+index 381169e..417296d 100644
 --- a/js/ui/workspaceThumbnail.js
 +++ b/js/ui/workspaceThumbnail.js
 @@ -68,7 +68,7 @@ var WindowClone = new Lang.Class({
@@ -109,27 +99,18 @@ index 0c72e74..4db8c19 100644
 -        this.clone._updateId = this.metaWindow.connect('position-changed',
 +        this.clone._updateId = this.realWindow.connect('notify::position',
                                                         this._onPositionChanged.bind(this));
-         this.clone._destroyId = this.realWindow.connect('destroy', this.destroy.bind(this));
-         this._onPositionChanged();
-@@ -141,7 +141,7 @@ var WindowClone = new Lang.Class({
- 
-         // First destroy the clone and then destroy everything
-         // This will ensure that we never see it in the _disconnectSignals loop
--        this.metaWindow.disconnect(this.clone._updateId);
-+        this.realWindow.disconnect(this.clone._updateId);
-         this.realWindow.disconnect(this.clone._destroyId);
-         this.clone.destroy();
- 
-@@ -156,7 +156,7 @@ var WindowClone = new Lang.Class({
+         this.clone._destroyId = this.realWindow.connect('destroy', () => {
+             // First destroy the clone and then destroy everything
+@@ -153,7 +153,7 @@ var WindowClone = new Lang.Class({
          let clone = new Clutter.Clone({ source: realDialog });
          this._updateDialogPosition(realDialog, clone);
  
 -        clone._updateId = metaDialog.connect('position-changed', dialog => {
-+        clone._updateId = metaDialog.connect('notify::position', dialog => {
++        clone._updateId = realDialog.connect('notify::position', dialog => {
              this._updateDialogPosition(dialog, clone);
          });
          clone._destroyId = realDialog.connect('destroy', () => {
-@@ -174,7 +174,6 @@ var WindowClone = new Lang.Class({
+@@ -171,7 +171,6 @@ var WindowClone = new Lang.Class({
      },
  
      _onPositionChanged() {
@@ -137,7 +118,7 @@ index 0c72e74..4db8c19 100644
          this.actor.set_position(this.realWindow.x, this.realWindow.y);
      },
  
-@@ -182,7 +181,7 @@ var WindowClone = new Lang.Class({
+@@ -179,7 +178,7 @@ var WindowClone = new Lang.Class({
          this.actor.get_children().forEach(child => {
              let realWindow = child.source;
  
-- 
ubuntu-desktop mailing list
ubuntu-desktop@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop

Reply via email to