summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Chalupa <mchqwerty@gmail.com>2014-09-01 17:20:33 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2014-09-10 16:33:13 +0300
commit8b771af9869442d4f4f5437e7ae3f6d3e9367b78 (patch)
tree5fd1f2e12b471f73c96a502f39073d1b72cf08d0
parentbfbb64bb75e8c61b1d8580ab688e494663feb4d0 (diff)
downloadweston-8b771af9869442d4f4f5437e7ae3f6d3e9367b78.tar.gz
weston-8b771af9869442d4f4f5437e7ae3f6d3e9367b78.tar.bz2
weston-8b771af9869442d4f4f5437e7ae3f6d3e9367b78.zip
xdg-shell: fix maximizing in multi-head setup
Set the right position of maximized window. Up until now we ignored output's "position" and were using only the working area of output which is in output-relative coordinates. This led to showing the maximized window always on the first output. This, along with the previous patch, fixes https://bugs.freedesktop.org/show_bug.cgi?id=82967 Signed-off-by: Marek Chalupa <mchqwerty@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
-rw-r--r--desktop-shell/shell.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 2b7b2476..3cc5733b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -5291,15 +5291,16 @@ set_maximized_position(struct desktop_shell *shell,
{
int32_t surf_x, surf_y;
pixman_rectangle32_t area;
+ pixman_box32_t *e;
- /* use surface configure to set the geometry */
get_output_work_area(shell, shsurf->output, &area);
surface_subsurfaces_boundingbox(shsurf->surface,
&surf_x, &surf_y, NULL, NULL);
+ e = pixman_region32_extents(&shsurf->output->region);
weston_view_set_position(shsurf->view,
- area.x - surf_x,
- area.y - surf_y);
+ e->x1 + area.x - surf_x,
+ e->y1 + area.y - surf_y);
}
static void