[mutter] window: Remove public meta_window_get_all_monitors API
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: Remove public meta_window_get_all_monitors API
- Date: Wed, 25 Jan 2017 08:32:13 +0000 (UTC)
commit 016359ede2bdc8b31341bf768547c7d221fd572e
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Dec 2 15:41:08 2016 +0800
window: Remove public meta_window_get_all_monitors API
It's not used anywhere and used monitor indices which is unoptimal.
https://bugzilla.gnome.org/show_bug.cgi?id=777732
src/core/window.c | 44 --------------------------------------------
src/meta/window.h | 1 -
2 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 8c732df..7d7d0c4 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -2799,50 +2799,6 @@ meta_window_is_fullscreen (MetaWindow *window)
}
/**
- * meta_window_get_all_monitors:
- * @window: The #MetaWindow
- * @length: (out): gint holding the length, may be %NULL to ignore
- *
- * Returns: (array length=length) (element-type gint) (transfer container):
- * List of the monitor indices the window is on.
- */
-gint *
-meta_window_get_all_monitors (MetaWindow *window, gsize *length)
-{
- MetaBackend *backend = meta_get_backend ();
- MetaMonitorManager *monitor_manager =
- meta_backend_get_monitor_manager (backend);
- MetaLogicalMonitor *logical_monitors;
- unsigned int n_logical_monitors;
- unsigned int i;
- GArray *monitors;
- MetaRectangle window_rect;
-
- logical_monitors =
- meta_monitor_manager_get_logical_monitors (monitor_manager,
- &n_logical_monitors);
-
- monitors = g_array_new (FALSE, FALSE, sizeof (int));
- meta_window_get_frame_rect (window, &window_rect);
-
- for (i = 0; i < n_logical_monitors; i++)
- {
- MetaRectangle *monitor_rect = &logical_monitors[i].rect;
-
- if (meta_rectangle_overlap (&window_rect, monitor_rect))
- g_array_append_val (monitors, i);
- }
-
- if (length)
- *length = monitors->len;
-
- i = -1;
- g_array_append_val (monitors, i);
-
- return (gint*) g_array_free (monitors, FALSE);
-}
-
-/**
* meta_window_is_screen_sized:
* @window: A #MetaWindow
*
diff --git a/src/meta/window.h b/src/meta/window.h
index 2ae325e..b482bed 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -185,7 +185,6 @@ gboolean meta_window_is_monitor_sized (MetaWindow *window);
gboolean meta_window_is_on_primary_monitor (MetaWindow *window);
gboolean meta_window_requested_bypass_compositor (MetaWindow *window);
gboolean meta_window_requested_dont_bypass_compositor (MetaWindow *window);
-gint *meta_window_get_all_monitors (MetaWindow *window, gsize *length);
gboolean meta_window_get_icon_geometry (MetaWindow *window,
MetaRectangle *rect);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]