mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-01-01 17:40:17 +01:00
compositor-wayland: Simplify fullscreen output surface handling
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
This commit is contained in:
parent
f16de17054
commit
f054d35aad
1 changed files with 3 additions and 14 deletions
|
|
@ -645,10 +645,7 @@ wayland_output_disable(struct weston_output *base)
|
|||
wl_egl_window_destroy(output->gl.egl_window);
|
||||
}
|
||||
|
||||
/* Done on output->enable when not fullscreen, otherwise
|
||||
* done in output_create, to get the proper mode */
|
||||
if (!b->fullscreen)
|
||||
wayland_backend_destroy_output_surface(output);
|
||||
wayland_backend_destroy_output_surface(output);
|
||||
|
||||
if (output->frame)
|
||||
frame_destroy(output->frame);
|
||||
|
|
@ -665,13 +662,9 @@ static void
|
|||
wayland_output_destroy(struct weston_output *base)
|
||||
{
|
||||
struct wayland_output *output = to_wayland_output(base);
|
||||
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
||||
|
||||
wayland_output_disable(&output->base);
|
||||
|
||||
if (b->fullscreen)
|
||||
wayland_backend_destroy_output_surface(output);
|
||||
|
||||
weston_output_destroy(&output->base);
|
||||
|
||||
free(output);
|
||||
|
|
@ -1068,15 +1061,12 @@ wayland_output_enable(struct weston_output *base)
|
|||
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
||||
int ret = 0;
|
||||
|
||||
|
||||
weston_log("Creating %dx%d wayland output at (%d, %d)\n",
|
||||
output->base.current_mode->width,
|
||||
output->base.current_mode->height,
|
||||
output->base.x, output->base.y);
|
||||
|
||||
/* If fullscreen was specified, this needs to be done before
|
||||
* enable to get the proper mode */
|
||||
if (!b->fullscreen)
|
||||
if (!output->parent.surface)
|
||||
ret = wayland_backend_create_output_surface(output);
|
||||
|
||||
if (ret < 0)
|
||||
|
|
@ -1132,8 +1122,7 @@ wayland_output_enable(struct weston_output *base)
|
|||
return 0;
|
||||
|
||||
err_output:
|
||||
if (!b->fullscreen)
|
||||
wayland_backend_destroy_output_surface(output);
|
||||
wayland_backend_destroy_output_surface(output);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue