MetaScreen: Remove const qualifiers from monitor getters

They will cause issues when monitors are stared in a GList.

https://bugzilla.gnome.org/show_bug.cgi?id=777732
This commit is contained in:
Jonas Ådahl 2016-11-28 21:15:57 +08:00
parent c936056663
commit 441b854d41
3 changed files with 23 additions and 23 deletions

View File

@ -671,7 +671,7 @@ meta_window_place (MetaWindow *window,
int *new_y) int *new_y)
{ {
GList *windows = NULL; GList *windows = NULL;
const MetaLogicalMonitor *logical_monitor; MetaLogicalMonitor *logical_monitor;
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc); meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);

View File

@ -133,22 +133,22 @@ void meta_screen_hide_tile_preview (MetaScreen *screen);
MetaWindow* meta_screen_get_mouse_window (MetaScreen *screen, MetaWindow* meta_screen_get_mouse_window (MetaScreen *screen,
MetaWindow *not_this_one); MetaWindow *not_this_one);
const MetaLogicalMonitor * meta_screen_get_current_logical_monitor (MetaScreen *screen); MetaLogicalMonitor * meta_screen_get_current_logical_monitor (MetaScreen *screen);
const MetaLogicalMonitor * meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen, MetaLogicalMonitor * meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen,
int x,
int y);
const MetaLogicalMonitor * meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
MetaRectangle *rect);
const MetaLogicalMonitor * meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen,
MetaWindow *window);
const MetaLogicalMonitor * meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
int x, int x,
int y); int y);
MetaLogicalMonitor * meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
MetaRectangle *rect);
MetaLogicalMonitor * meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen,
MetaWindow *window);
const MetaLogicalMonitor * meta_screen_get_monitor_neighbor (MetaScreen *screen, MetaLogicalMonitor * meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
int which_monitor, int x,
MetaScreenDirection dir); int y);
MetaLogicalMonitor * meta_screen_get_monitor_neighbor (MetaScreen *screen,
int which_monitor,
MetaScreenDirection dir);
void meta_screen_update_workspace_layout (MetaScreen *screen); void meta_screen_update_workspace_layout (MetaScreen *screen);
void meta_screen_update_workspace_names (MetaScreen *screen); void meta_screen_update_workspace_names (MetaScreen *screen);

View File

@ -1248,7 +1248,7 @@ root_cursor_prepare_at (MetaCursorSprite *cursor_sprite,
int y, int y,
MetaScreen *screen) MetaScreen *screen)
{ {
const MetaLogicalMonitor *logical_monitor; MetaLogicalMonitor *logical_monitor;
logical_monitor = meta_screen_get_logical_monitor_for_point (screen, x, y); logical_monitor = meta_screen_get_logical_monitor_for_point (screen, x, y);
@ -1408,7 +1408,7 @@ meta_screen_get_mouse_window (MetaScreen *screen,
return window; return window;
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_get_logical_monitor_for_rect (MetaScreen *screen, meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
MetaRectangle *rect) MetaRectangle *rect)
{ {
@ -1461,7 +1461,7 @@ meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
return &logical_monitors[best_monitor]; return &logical_monitors[best_monitor];
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen, meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen,
MetaWindow *window) MetaWindow *window)
{ {
@ -1476,13 +1476,13 @@ int
meta_screen_get_monitor_index_for_rect (MetaScreen *screen, meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
MetaRectangle *rect) MetaRectangle *rect)
{ {
const MetaLogicalMonitor *monitor; MetaLogicalMonitor *monitor;
monitor = meta_screen_get_logical_monitor_for_rect (screen, rect); monitor = meta_screen_get_logical_monitor_for_rect (screen, rect);
return monitor->number; return monitor->number;
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_get_logical_monitor_for_point (MetaScreen *screen, meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
int x, int x,
int y) int y)
@ -1510,7 +1510,7 @@ meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
return NULL; return NULL;
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_get_monitor_neighbor (MetaScreen *screen, meta_screen_get_monitor_neighbor (MetaScreen *screen,
int which_monitor, int which_monitor,
MetaScreenDirection direction) MetaScreenDirection direction)
@ -1558,7 +1558,7 @@ meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
int which_monitor, int which_monitor,
MetaScreenDirection direction) MetaScreenDirection direction)
{ {
const MetaLogicalMonitor *logical_monitor; MetaLogicalMonitor *logical_monitor;
logical_monitor = meta_screen_get_monitor_neighbor (screen, logical_monitor = meta_screen_get_monitor_neighbor (screen,
which_monitor, which_monitor,
@ -1566,7 +1566,7 @@ meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
return logical_monitor ? logical_monitor->number : -1; return logical_monitor ? logical_monitor->number : -1;
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_get_current_logical_monitor (MetaScreen *screen) meta_screen_get_current_logical_monitor (MetaScreen *screen)
{ {
MetaBackend *backend = meta_get_backend (); MetaBackend *backend = meta_get_backend ();
@ -1584,7 +1584,7 @@ meta_screen_get_current_logical_monitor (MetaScreen *screen)
return &logical_monitors[monitor_index]; return &logical_monitors[monitor_index];
} }
const MetaLogicalMonitor * MetaLogicalMonitor *
meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen, meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen,
int x, int x,
int y) int y)