[gnome-shell] workspaceThumbnails: Move to primary monitor first when creating workspace
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnails: Move to primary monitor first when creating workspace
- Date: Sat, 3 May 2014 21:55:10 +0000 (UTC)
commit c7306449aeb1568af411f8142977b73017be35c7
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Apr 26 16:17:24 2014 +0200
workspaceThumbnails: Move to primary monitor first when creating workspace
When dragging a window preview from a non-primary monitor onto a
workspace thumbnail, the window is moved to the primery monitor
first before changing its workspace. However when dragging the window
between thumbnails to create a new workspace, it is kept on its current
monitor instead. This is not only inconsistent, but outright confusing
with the default 'workspaces-only-on-primary' setting, as the newly
created workspace is immediately removed again.
https://bugzilla.gnome.org/show_bug.cgi?id=683819
js/ui/workspaceThumbnail.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index 1eb843d..b1bc7cb 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -826,10 +826,14 @@ const ThumbnailsBox = new Lang.Class({
window.change_workspace_by_index(window.get_workspace().index() + 1, true);
});
- if (isWindow)
+ if (isWindow) {
// ... and bam, a workspace, good as new.
+ // Move the window to our monitor first if necessary.
+ let thumbMonitor = this._thumbnails[newWorkspaceIndex].monitorIndex;
+ if (source.metaWindow.get_monitor() != thumbMonitor)
+ source.metaWindow.move_to_monitor(thumbMonitor);
source.metaWindow.change_workspace_by_index(newWorkspaceIndex, true);
- else if (source.shellWorkspaceLaunch) {
+ } else if (source.shellWorkspaceLaunch) {
source.shellWorkspaceLaunch({ workspace: newWorkspaceIndex,
timestamp: time });
// This new workspace will be automatically removed if the application fails
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]