diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-09 21:43:22 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-07-09 21:49:10 -0400 |
commit | e4d3a2bce6ac6686472783b09929a7c3956f7848 (patch) | |
tree | 184bba329454f8e3d2d256bf8a04b9b7e4d21697 | |
parent | e3ebd33e8801c5a7e2553b71851fefba83f34fe7 (diff) |
Only position fullscreen surface in surface->configure callback
We end up calling shell_configure_fullscreen() from activate(), where
surface->buffer may be NULL. Instead, call it on initial map and
first buffer attach after surface type change. Both code path
come from the surface->configure callback where surface->buffer is know
to be non-NULL.
https://bugs.freedesktop.org/show_bug.cgi?id=51678
-rw-r--r-- | src/shell.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shell.c b/src/shell.c index a0d20889..2cc0139b 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1261,6 +1261,7 @@ set_surface_type(struct shell_surface *shsurf) shsurf->saved_x = surface->geometry.x; shsurf->saved_y = surface->geometry.y; shsurf->saved_position_valid = true; + center_on_output(surface, shsurf->fullscreen_output); if (!wl_list_empty(&shsurf->rotation.transform.link)) { wl_list_remove(&shsurf->rotation.transform.link); @@ -1401,8 +1402,6 @@ shell_configure_fullscreen(struct shell_surface *shsurf) struct weston_matrix *matrix; float scale; - center_on_output(surface, output); - if (!shsurf->fullscreen.black_surface) shsurf->fullscreen.black_surface = create_black_surface(surface->compositor, @@ -2543,6 +2542,7 @@ map(struct desktop_shell *shell, struct weston_surface *surface, 10 + random() % 400); break; case SHELL_SURFACE_FULLSCREEN: + center_on_output(surface, shsurf->fullscreen_output); shell_map_fullscreen(shsurf); break; case SHELL_SURFACE_MAXIMIZED: |