[mutter] window: Make meta_window_located_on_workspace() public



commit d8eb47e2b77be115baa5309a5b23cecf371b7f3a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jan 14 12:34:14 2013 -0500

    window: Make meta_window_located_on_workspace() public
    
    We have some code in gnome-shell that does the equivalent of:
    
        window.get_workspace() == workspace || window.is_on_all_workspaces();
    
    which is a bit unwieldy. We already have a method in mutter,
    so use that and document it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691744

 src/core/window-private.h |    3 ---
 src/core/window.c         |    8 ++++++++
 src/meta/window.h         |    2 ++
 3 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/src/core/window-private.h b/src/core/window-private.h
index a1cb15d..9b7987d 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -595,9 +595,6 @@ void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
 
 GList* meta_window_get_workspaces (MetaWindow *window);
 
-gboolean meta_window_located_on_workspace (MetaWindow    *window,
-                                           MetaWorkspace *workspace);
-
 void meta_window_get_work_area_current_monitor (MetaWindow    *window,
                                                 MetaRectangle *area);
 void meta_window_get_work_area_for_monitor     (MetaWindow    *window,
diff --git a/src/core/window.c b/src/core/window.c
index b2db85e..87a6197 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2109,6 +2109,14 @@ set_net_wm_state (MetaWindow *window)
     }
 }
 
+/**
+ * meta_window_located_on_workspace:
+ * @window: a #MetaWindow
+ * @workspace: a #MetaWorkspace
+ *
+ * Returns whether @window is displayed on @workspace, or whether it
+ * will be displayed on all workspaces.
+ */
 gboolean
 meta_window_located_on_workspace (MetaWindow    *window,
                                   MetaWorkspace *workspace)
diff --git a/src/meta/window.h b/src/meta/window.h
index 4aec594..4d74baf 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -85,6 +85,8 @@ Atom meta_window_get_window_type_atom (MetaWindow *window);
 MetaWorkspace *meta_window_get_workspace (MetaWindow *window);
 int      meta_window_get_monitor (MetaWindow *window);
 gboolean meta_window_is_on_all_workspaces (MetaWindow *window);
+gboolean meta_window_located_on_workspace (MetaWindow    *window,
+                                           MetaWorkspace *workspace);
 gboolean meta_window_is_hidden (MetaWindow *window);
 void     meta_window_activate  (MetaWindow *window,guint32 current_time);
 void     meta_window_activate_with_workspace (MetaWindow    *window,



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