summaryrefslogtreecommitdiff
path: root/src/place.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/place.c')
-rw-r--r--src/place.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/place.c b/src/place.c
index 023ff7d..8da2be8 100644
--- a/src/place.c
+++ b/src/place.c
@@ -427,7 +427,8 @@ find_first_fit (MetaWindow *window,
MetaRectangle rect;
retval = FALSE;
-
+ sorted = NULL;
+
rect.width = window->rect.width;
rect.height = window->rect.height;
@@ -436,6 +437,26 @@ find_first_fit (MetaWindow *window,
rect.width += fgeom->left_width + fgeom->right_width;
rect.height += fgeom->top_height + fgeom->bottom_height;
}
+
+ /* Try origin of first Xinerama */
+ rect.x = window->screen->xinerama_infos[0].x_origin;
+ rect.y = window->screen->xinerama_infos[0].y_origin;
+
+ if (fit_rect_in_xinerama (window->screen, &rect) &&
+ !rectangle_overlaps_some_window (&rect, windows))
+ {
+ *new_x = rect.x;
+ *new_y = rect.y;
+ if (fgeom)
+ {
+ *new_x += fgeom->left_width;
+ *new_y += fgeom->top_height;
+ }
+
+ retval = TRUE;
+
+ goto out;
+ }
sorted = g_list_copy (windows);
@@ -468,7 +489,7 @@ find_first_fit (MetaWindow *window,
retval = TRUE;
goto out;
- }
+ }
tmp = tmp->next;
}