summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-10-23 21:21:52 +0000
committerElijah Newren <newren@src.gnome.org>2005-10-23 21:21:52 +0000
commit46286c4875e931d5f7970d626db9a0d864ce26d9 (patch)
tree8e6cbad0a830f904d503608165e6b89da4fbb2cb
parent4c0ac032fa5dfdf08756c98f79fdacf29581b7e4 (diff)
downloadmetacity-46286c4875e931d5f7970d626db9a0d864ce26d9.tar.gz
Fix edge snapping for multi-screen (non-xinerama) setups. #319425
2005-10-23 Elijah Newren <newren@gmail.com> Fix edge snapping for multi-screen (non-xinerama) setups. #319425 * src/place.c (get_windows_showing_on_same_screen, get_vertical_edges, get_horizontal_edges): rename get_windows_on_same_workspace() to get_windows_showing_on_same_screen() * src/place.c (get_windows_showing_on_same_screen): exclude windows in the list that are on a different screen
-rw-r--r--ChangeLog12
-rw-r--r--src/place.c12
2 files changed, 19 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bdfbcfc..7ebedec6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-10-23 Elijah Newren <newren@gmail.com>
+
+ Fix edge snapping for multi-screen (non-xinerama) setups. #319425
+
+ * src/place.c (get_windows_showing_on_same_screen,
+ get_vertical_edges, get_horizontal_edges): rename
+ get_windows_on_same_workspace() to
+ get_windows_showing_on_same_screen()
+
+ * src/place.c (get_windows_showing_on_same_screen): exclude windows
+ in the list that are on a different screen
+
2005-10-08 Elijah Newren <newren@gmail.com>
Fix a crash that occurs when removing some virtual desktops and
diff --git a/src/place.c b/src/place.c
index 5620be2a..25d5de35 100644
--- a/src/place.c
+++ b/src/place.c
@@ -1056,8 +1056,8 @@ meta_window_place (MetaWindow *window,
* would be weird otherwise.
*/
static GSList*
-get_windows_on_same_workspace (MetaWindow *window,
- int *n_windows)
+get_windows_showing_on_same_screen (MetaWindow *window,
+ int *n_windows)
{
GSList *windows;
GSList *all_windows;
@@ -1074,7 +1074,9 @@ get_windows_on_same_workspace (MetaWindow *window,
{
MetaWindow *w = tmp->data;
- if (meta_window_should_be_showing (w) && w != window)
+ if (meta_window_should_be_showing (w) &&
+ w->screen == window->screen &&
+ w != window)
{
windows = g_slist_prepend (windows, w);
++i;
@@ -1131,7 +1133,7 @@ get_vertical_edges (MetaWindow *window,
MetaRectangle rect;
MetaRectangle work_area;
- windows = get_windows_on_same_workspace (window, &n_windows);
+ windows = get_windows_showing_on_same_screen (window, &n_windows);
edges = g_array_sized_new (FALSE, FALSE, sizeof (int),
n_windows * 2 + 4 /* 4 = workspace/screen edges */
@@ -1213,7 +1215,7 @@ get_horizontal_edges (MetaWindow *window,
MetaRectangle rect;
MetaRectangle work_area;
- windows = get_windows_on_same_workspace (window, &n_windows);
+ windows = get_windows_showing_on_same_screen (window, &n_windows);
edges = g_array_sized_new (FALSE, FALSE, sizeof (int),
n_windows * 2 + 4 /* 4 = workspace/screen edges */