[mutter] screen: Remove unused function
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen: Remove unused function
- Date: Wed, 25 Jan 2017 08:29:57 +0000 (UTC)
commit e1b10769e52fcc828bd2b3ac1f46c8d78da18e71
Author: Jonas Ådahl <jadahl gmail com>
Date: Fri Nov 25 14:33:23 2016 +0800
screen: Remove unused function
https://bugzilla.gnome.org/show_bug.cgi?id=777732
src/core/screen-private.h | 3 -
src/core/screen.c | 95 ---------------------------------------------
2 files changed, 0 insertions(+), 98 deletions(-)
---
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index d3667d6..2e26a9e 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -153,9 +153,6 @@ const MetaMonitorInfo* meta_screen_get_monitor_for_point (MetaScreen *screen,
const MetaMonitorInfo* meta_screen_get_monitor_neighbor (MetaScreen *screen,
int which_monitor,
MetaScreenDirection dir);
-void meta_screen_get_natural_monitor_list (MetaScreen *screen,
- int** monitors_list,
- int* n_monitors);
void meta_screen_update_workspace_layout (MetaScreen *screen);
void meta_screen_update_workspace_names (MetaScreen *screen);
diff --git a/src/core/screen.c b/src/core/screen.c
index b8ac22f..0da4a02 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1513,101 +1513,6 @@ meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
return monitor ? monitor->number : -1;
}
-void
-meta_screen_get_natural_monitor_list (MetaScreen *screen,
- int** monitors_list,
- int* n_monitors)
-{
- const MetaMonitorInfo* current;
- const MetaMonitorInfo* tmp;
- GQueue* monitor_queue;
- int* visited;
- int cur = 0;
- int i;
-
- *n_monitors = screen->n_monitor_infos;
- *monitors_list = g_new (int, screen->n_monitor_infos);
-
- /* we calculate a natural ordering by which to choose monitors for
- * window placement. We start at the current monitor, and perform
- * a breadth-first search of the monitors starting from that
- * monitor. We choose preferentially left, then right, then down,
- * then up. The visitation order produced by this traversal is the
- * natural monitor ordering.
- */
-
- visited = g_new (int, screen->n_monitor_infos);
- for (i = 0; i < screen->n_monitor_infos; i++)
- {
- visited[i] = FALSE;
- }
-
- current = meta_screen_get_current_monitor_info (screen);
- monitor_queue = g_queue_new ();
- g_queue_push_tail (monitor_queue, (gpointer) current);
- visited[current->number] = TRUE;
-
- while (!g_queue_is_empty (monitor_queue))
- {
- current = (const MetaMonitorInfo*)
- g_queue_pop_head (monitor_queue);
-
- (*monitors_list)[cur++] = current->number;
-
- /* enqueue each of the directions */
- tmp = meta_screen_get_monitor_neighbor (screen,
- current->number,
- META_SCREEN_LEFT);
- if (tmp && !visited[tmp->number])
- {
- g_queue_push_tail (monitor_queue,
- (MetaMonitorInfo*) tmp);
- visited[tmp->number] = TRUE;
- }
- tmp = meta_screen_get_monitor_neighbor (screen,
- current->number,
- META_SCREEN_RIGHT);
- if (tmp && !visited[tmp->number])
- {
- g_queue_push_tail (monitor_queue,
- (MetaMonitorInfo*) tmp);
- visited[tmp->number] = TRUE;
- }
- tmp = meta_screen_get_monitor_neighbor (screen,
- current->number,
- META_SCREEN_UP);
- if (tmp && !visited[tmp->number])
- {
- g_queue_push_tail (monitor_queue,
- (MetaMonitorInfo*) tmp);
- visited[tmp->number] = TRUE;
- }
- tmp = meta_screen_get_monitor_neighbor (screen,
- current->number,
- META_SCREEN_DOWN);
- if (tmp && !visited[tmp->number])
- {
- g_queue_push_tail (monitor_queue,
- (MetaMonitorInfo*) tmp);
- visited[tmp->number] = TRUE;
- }
- }
-
- /* in case we somehow missed some set of monitors, go through the
- * visited list and add in any monitors that were missed
- */
- for (i = 0; i < screen->n_monitor_infos; i++)
- {
- if (visited[i] == FALSE)
- {
- (*monitors_list)[cur++] = i;
- }
- }
-
- g_free (visited);
- g_queue_free (monitor_queue);
-}
-
const MetaMonitorInfo*
meta_screen_get_current_monitor_info (MetaScreen *screen)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]