[gnome-shell] Use meta_window_is_skip_taskbar() directly
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Use meta_window_is_skip_taskbar() directly
- Date: Fri, 31 Jan 2014 12:52:20 +0000 (UTC)
commit b4680a5c253ac1d1b3d847a5f94150c6e8122fba
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jan 30 18:04:18 2014 +0100
Use meta_window_is_skip_taskbar() directly
Rather than going through ShellWindowTracker, we can just clean up
the code to use the underlying MetaWindow property directly.
https://bugzilla.gnome.org/show_bug.cgi?id=723308
js/ui/appDisplay.js | 2 +-
js/ui/workspace.js | 3 +--
js/ui/workspaceThumbnail.js | 3 +--
src/shell-app.c | 6 +++---
4 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 748537d..f23d054 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1532,7 +1532,7 @@ const AppIconMenu = new Lang.Class({
this.removeAll();
let windows = this._source.app.get_windows().filter(function(w) {
- return Shell.WindowTracker.is_window_interesting(w);
+ return !w.skip_taskbar;
});
// Display the app windows menu items and the separator between windows
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 65aef36..d048dd2 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -1619,8 +1619,7 @@ const Workspace = new Lang.Class({
// Tests if @win should be shown in the Overview
_isOverviewWindow : function (win) {
- let tracker = Shell.WindowTracker.get_default();
- return tracker.is_window_interesting(win.get_meta_window());
+ return !win.get_meta_window().skip_taskbar;
},
// Create a clone of a (non-desktop) window and add it to the window list
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index f51b1fa..aab6a7e 100644
--- a/js/ui/workspaceThumbnail.js
+++ b/js/ui/workspaceThumbnail.js
@@ -507,8 +507,7 @@ const WorkspaceThumbnail = new Lang.Class({
// Tests if @win should be shown in the Overview
_isOverviewWindow : function (win) {
- let tracker = Shell.WindowTracker.get_default();
- return tracker.is_window_interesting(win.get_meta_window()) &&
+ return !win.get_meta_window().skip_taskbar &&
win.get_meta_window().showing_on_its_workspace();
},
diff --git a/src/shell-app.c b/src/shell-app.c
index 15a0460..3766f33 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1048,7 +1048,7 @@ _shell_app_add_window (ShellApp *app,
shell_app_update_app_menu (app, window);
shell_app_ensure_busy_watch (app);
- if (shell_window_tracker_is_window_interesting (window))
+ if (!meta_window_is_skip_taskbar (window))
app->running_state->interesting_windows++;
shell_app_maybe_start_stop (app);
@@ -1072,7 +1072,7 @@ _shell_app_remove_window (ShellApp *app,
g_object_unref (window);
app->running_state->windows = g_slist_remove (app->running_state->windows, window);
- if (shell_window_tracker_is_window_interesting (window))
+ if (!meta_window_is_skip_taskbar (window))
app->running_state->interesting_windows--;
shell_app_maybe_start_stop (app);
@@ -1166,7 +1166,7 @@ shell_app_request_quit (ShellApp *app)
{
MetaWindow *win = iter->data;
- if (!shell_window_tracker_is_window_interesting (win))
+ if (meta_window_is_skip_taskbar (win))
continue;
meta_window_delete (win, shell_global_get_current_time (shell_global_get ()));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]