summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/window-private.h3
-rw-r--r--src/core/window.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/src/core/window-private.h b/src/core/window-private.h
index 5abef1e1..ca631966 100644
--- a/src/core/window-private.h
+++ b/src/core/window-private.h
@@ -618,6 +618,9 @@ void meta_window_set_gravity (MetaWindow *window,
void meta_window_handle_mouse_grab_op_event (MetaWindow *window,
XEvent *event);
+MetaWorkspace *
+meta_window_get_workspace (MetaWindow *window);
+
GList* meta_window_get_workspaces (MetaWindow *window);
gboolean meta_window_located_on_workspace (MetaWindow *window,
diff --git a/src/core/window.c b/src/core/window.c
index 21d605e2..603bedf3 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -6214,6 +6214,17 @@ idle_update_icon (gpointer data)
return FALSE;
}
+
+MetaWorkspace *
+meta_window_get_workspace (MetaWindow *window)
+{
+ if (window->on_all_workspaces)
+ return window->screen->active_workspace;
+ else
+ return window->workspace;
+}
+
+
GList*
meta_window_get_workspaces (MetaWindow *window)
{