[mutter/override-redirect-exclusion: 10/15] Don't add override-redirect windows to workspaces
- From: Owen Taylor <otaylor src gnome org>
- To: svn-commits-list gnome org
- Subject: [mutter/override-redirect-exclusion: 10/15] Don't add override-redirect windows to workspaces
- Date: Tue, 16 Jun 2009 09:58:58 -0400 (EDT)
commit d6576d9b70dd8bff6bebc1041f17a4670363ab6e
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Jun 15 18:02:32 2009 -0400
Don't add override-redirect windows to workspaces
Normally a window that is "on all workspaces", is also on a particular
workspace (to deal with being unstuck.) This is pointless for
override-redirect windows.
http://bugzilla.gnome.org/show_bug.cgi?id=582639
src/core/window.c | 62 +++++++++++++++++++++++++++++------------------------
1 files changed, 34 insertions(+), 28 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 7b5e556..1c81d8e 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -898,44 +898,50 @@ meta_window_new_with_attrs (MetaDisplay *display,
}
}
- if (window->workspace == NULL &&
- window->xtransient_for != None)
+ /* override-redirect windows are subtly different from other windows
+ * with window->on_all_workspaces == TRUE. Other windows are part of
+ * some workspace (so they can return to that if the flag is turned off),
+ * but appear on other workspaces. override-redirect windows are part
+ * of no workspace.
+ */
+ if (!window->override_redirect)
{
- /* Try putting dialog on parent's workspace */
- MetaWindow *parent;
+ if (window->workspace == NULL &&
+ window->xtransient_for != None)
+ {
+ /* Try putting dialog on parent's workspace */
+ MetaWindow *parent;
- parent = meta_display_lookup_x_window (window->display,
- window->xtransient_for);
+ parent = meta_display_lookup_x_window (window->display,
+ window->xtransient_for);
- if (parent && parent->workspace)
- {
- meta_topic (META_DEBUG_PLACEMENT,
- "Putting window %s on same workspace as parent %s\n",
- window->desc, parent->desc);
+ if (parent && parent->workspace)
+ {
+ meta_topic (META_DEBUG_PLACEMENT,
+ "Putting window %s on same workspace as parent %s\n",
+ window->desc, parent->desc);
- if (parent->on_all_workspaces)
- window->on_all_workspaces = TRUE;
+ if (parent->on_all_workspaces)
+ window->on_all_workspaces = TRUE;
- /* this will implicitly add to the appropriate MRU lists
- */
- meta_workspace_add_window (parent->workspace, window);
+ /* this will implicitly add to the appropriate MRU lists
+ */
+ meta_workspace_add_window (parent->workspace, window);
+ }
}
- }
- if (window->workspace == NULL)
- {
- meta_topic (META_DEBUG_PLACEMENT,
- "Putting window %s on active workspace\n",
- window->desc);
+ if (window->workspace == NULL)
+ {
+ meta_topic (META_DEBUG_PLACEMENT,
+ "Putting window %s on active workspace\n",
+ window->desc);
- space = window->screen->active_workspace;
+ space = window->screen->active_workspace;
- meta_workspace_add_window (space, window);
- }
+ meta_workspace_add_window (space, window);
+ }
- /* for the various on_all_workspaces = TRUE possible above */
- if (!window->override_redirect)
- {
+ /* for the various on_all_workspaces = TRUE possible above */
meta_window_set_current_workspace_hint (window);
meta_window_update_struts (window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]