From 137052a05c209fbc0dac14136c335bce3f4165a8 Mon Sep 17 00:00:00 2001 From: Tom Beckmann Date: Tue, 17 Jul 2012 17:46:39 +0200 Subject: [PATCH] Move all windows of an app via DnD in workspaceview --- src/Widgets/AppIcon.vala | 17 +++++++++++++++-- src/Widgets/WorkspaceThumb.vala | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Widgets/AppIcon.vala b/src/Widgets/AppIcon.vala index 1f3c2f07..7be931b7 100644 --- a/src/Widgets/AppIcon.vala +++ b/src/Widgets/AppIcon.vala @@ -24,10 +24,12 @@ namespace Gala { Window window; + Bamf.Application app; - public AppIcon (Window _window) + public AppIcon (Window _window, Bamf.Application _app) { window = _window; + app = _app; try { set_from_pixbuf (Utils.get_icon_for_window (window, WorkspaceThumb.APP_ICON_SIZE)); @@ -75,7 +77,18 @@ namespace Gala icons.add_child (actor); icons.animate (AnimationMode.LINEAR, 100, x:Math.floorf (wallpaper.x + wallpaper.width / 2 - icons.width / 2)); - window.change_workspace ((WorkspaceThumb.destination as WorkspaceThumb).workspace); + + var xids = app.get_xids (); + if (xids.length > 1) { //get all the windows that belong to this app + var wins = window.get_workspace ().list_windows (); + for (var i=0;i