diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 2b7b247691c4828ff252778473142644e1caa351..3cc5733bf4024513c9e757e1cf77be6e2dd12662 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