[mutter] MetaScreen: Remove const qualifiers from monitor getters
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaScreen: Remove const qualifiers from monitor getters
- Date: Wed, 25 Jan 2017 08:30:32 +0000 (UTC)
commit 441b854d41331a3a4147f5498ed157f47f252117
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Nov 28 21:15:57 2016 +0800
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
src/core/place.c | 2 +-
src/core/screen-private.h | 28 ++++++++++++++--------------
src/core/screen.c | 18 +++++++++---------
3 files changed, 24 insertions(+), 24 deletions(-)
---
diff --git a/src/core/place.c b/src/core/place.c
index decb590..38118cf 100644
--- a/src/core/place.c
+++ b/src/core/place.c
@@ -671,7 +671,7 @@ meta_window_place (MetaWindow *window,
int *new_y)
{
GList *windows = NULL;
- const MetaLogicalMonitor *logical_monitor;
+ MetaLogicalMonitor *logical_monitor;
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);
diff --git a/src/core/screen-private.h b/src/core/screen-private.h
index da7fbd8..809c461 100644
--- a/src/core/screen-private.h
+++ b/src/core/screen-private.h
@@ -133,22 +133,22 @@ void meta_screen_hide_tile_preview (MetaScreen *screen);
MetaWindow* meta_screen_get_mouse_window (MetaScreen *screen,
MetaWindow *not_this_one);
-const MetaLogicalMonitor * meta_screen_get_current_logical_monitor (MetaScreen *screen);
-const 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,
+MetaLogicalMonitor * meta_screen_get_current_logical_monitor (MetaScreen *screen);
+MetaLogicalMonitor * meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen,
int x,
int y);
-
-const MetaLogicalMonitor * meta_screen_get_monitor_neighbor (MetaScreen *screen,
- int which_monitor,
- MetaScreenDirection dir);
+MetaLogicalMonitor * meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
+ MetaRectangle *rect);
+MetaLogicalMonitor * meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen,
+ MetaWindow *window);
+
+MetaLogicalMonitor * meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
+ int x,
+ 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_names (MetaScreen *screen);
diff --git a/src/core/screen.c b/src/core/screen.c
index 1023fd7..d3ed1c4 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -1248,7 +1248,7 @@ root_cursor_prepare_at (MetaCursorSprite *cursor_sprite,
int y,
MetaScreen *screen)
{
- const MetaLogicalMonitor *logical_monitor;
+ MetaLogicalMonitor *logical_monitor;
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;
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
MetaRectangle *rect)
{
@@ -1461,7 +1461,7 @@ meta_screen_get_logical_monitor_for_rect (MetaScreen *screen,
return &logical_monitors[best_monitor];
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_calculate_logical_monitor_for_window (MetaScreen *screen,
MetaWindow *window)
{
@@ -1476,13 +1476,13 @@ int
meta_screen_get_monitor_index_for_rect (MetaScreen *screen,
MetaRectangle *rect)
{
- const MetaLogicalMonitor *monitor;
+ MetaLogicalMonitor *monitor;
monitor = meta_screen_get_logical_monitor_for_rect (screen, rect);
return monitor->number;
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
int x,
int y)
@@ -1510,7 +1510,7 @@ meta_screen_get_logical_monitor_for_point (MetaScreen *screen,
return NULL;
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_get_monitor_neighbor (MetaScreen *screen,
int which_monitor,
MetaScreenDirection direction)
@@ -1558,7 +1558,7 @@ meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
int which_monitor,
MetaScreenDirection direction)
{
- const MetaLogicalMonitor *logical_monitor;
+ MetaLogicalMonitor *logical_monitor;
logical_monitor = meta_screen_get_monitor_neighbor (screen,
which_monitor,
@@ -1566,7 +1566,7 @@ meta_screen_get_monitor_neighbor_index (MetaScreen *screen,
return logical_monitor ? logical_monitor->number : -1;
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_get_current_logical_monitor (MetaScreen *screen)
{
MetaBackend *backend = meta_get_backend ();
@@ -1584,7 +1584,7 @@ meta_screen_get_current_logical_monitor (MetaScreen *screen)
return &logical_monitors[monitor_index];
}
-const MetaLogicalMonitor *
+MetaLogicalMonitor *
meta_screen_get_current_logical_monitor_for_pos (MetaScreen *screen,
int x,
int y)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]