[mutter] Use meta_window_located_on_workspace() in more places



commit df15843407fb073918b53b6bcde2c7ae2ab3dfaf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Jan 18 14:55:23 2013 -0500

    Use meta_window_located_on_workspace() in more places
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691744

 src/core/place.c     |    7 +++----
 src/core/window.c    |    4 +---
 src/core/workspace.c |    3 +--
 3 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/src/core/place.c b/src/core/place.c
index fcb2f69..70171cb 100644
--- a/src/core/place.c
+++ b/src/core/place.c
@@ -847,10 +847,9 @@ meta_window_place (MetaWindow        *window,
       {
         MetaWindow *w = tmp->data;
 
-        if (meta_window_showing_on_its_workspace (w) &&
-            w != window && 
-            (window->workspace == w->workspace ||
-             window->on_all_workspaces || w->on_all_workspaces))
+        if (w != window &&
+            meta_window_showing_on_its_workspace (w) &&
+            meta_window_located_on_workspace (w, window->workspace))
           windows = g_list_prepend (windows, w);
 
         tmp = tmp->next;
diff --git a/src/core/window.c b/src/core/window.c
index 87a6197..83255e0 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -10129,9 +10129,7 @@ meta_window_set_demands_attention (MetaWindow *window)
           other_window = stack->data;
           stack = stack->next;
 
-          if (other_window->on_all_workspaces ||
-              window->on_all_workspaces ||
-              other_window->workspace == window->workspace)
+          if (meta_window_located_on_workspace (other_window, window->workspace))
             {
               meta_window_get_outer_rect (other_window, &other_rect);
 
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 0ab52a6..62a04d2 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -1292,8 +1292,7 @@ focus_ancestor_or_top_window (MetaWorkspace *workspace,
       ancestor = NULL;
       meta_window_foreach_ancestor (not_this_one, record_ancestor, &ancestor);
       if (ancestor != NULL &&
-          (ancestor->on_all_workspaces ||
-           ancestor->workspace == workspace) &&
+          meta_window_located_on_workspace (ancestor, workspace) &&
           meta_window_showing_on_its_workspace (ancestor))
         {
           meta_topic (META_DEBUG_FOCUS,



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