[gnome-shell] workspaceThumbnail: don't move transient windows for workspaces



commit 8dfcee9039c21f9333afbf90f83aca98c63552e7
Author: Bradley Pankow <BTPankow gnome gmail com>
Date:   Tue Jul 30 16:35:52 2013 -0400

    workspaceThumbnail: don't move transient windows for workspaces
    
    When we shift workspaces to create a blank one for a window or
    application, all of the window actors are shifted down.  However, some
    of these window actors are transient windows attached to a main window.
    When these windows are moved to a different workspace, the main window
    is moved along with it. When the main window is moved, these windows
    are also moved. This creates a double move of the windows.
    This double movement leads to unexpected results where workspaces are
    collapsed and windows are in incorrect positions.
    This patch prevents movement of these transient windows, only grabbing
    the main (ancestor) windows to move to a different workspace.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705174

 js/ui/workspaceThumbnail.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index c5cd7e3..d853280 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -739,6 +739,10 @@ const ThumbnailsBox = new Lang.Class({
 
             // Nab all the windows below us.
             let windows = global.get_window_actors().filter(function(win) {
+                // If the window is attached to an ancestor, we don't need/want to move it
+                if (!!win.meta_window.get_transient_for())
+                    return false;
+                
                 if (isWindow)
                     return win.get_workspace() >= newWorkspaceIndex && win != source;
                 else


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