compositor-wayland: Simplify fullscreen output surface handling
Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
This commit is contained in:
committed by
Daniel Stone
parent
f16de17054
commit
f054d35aad
@@ -645,9 +645,6 @@ wayland_output_disable(struct weston_output *base)
|
|||||||
wl_egl_window_destroy(output->gl.egl_window);
|
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)
|
if (output->frame)
|
||||||
@@ -665,13 +662,9 @@ static void
|
|||||||
wayland_output_destroy(struct weston_output *base)
|
wayland_output_destroy(struct weston_output *base)
|
||||||
{
|
{
|
||||||
struct wayland_output *output = to_wayland_output(base);
|
struct wayland_output *output = to_wayland_output(base);
|
||||||
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
|
||||||
|
|
||||||
wayland_output_disable(&output->base);
|
wayland_output_disable(&output->base);
|
||||||
|
|
||||||
if (b->fullscreen)
|
|
||||||
wayland_backend_destroy_output_surface(output);
|
|
||||||
|
|
||||||
weston_output_destroy(&output->base);
|
weston_output_destroy(&output->base);
|
||||||
|
|
||||||
free(output);
|
free(output);
|
||||||
@@ -1068,15 +1061,12 @@ wayland_output_enable(struct weston_output *base)
|
|||||||
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
struct wayland_backend *b = to_wayland_backend(base->compositor);
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
|
||||||
weston_log("Creating %dx%d wayland output at (%d, %d)\n",
|
weston_log("Creating %dx%d wayland output at (%d, %d)\n",
|
||||||
output->base.current_mode->width,
|
output->base.current_mode->width,
|
||||||
output->base.current_mode->height,
|
output->base.current_mode->height,
|
||||||
output->base.x, output->base.y);
|
output->base.x, output->base.y);
|
||||||
|
|
||||||
/* If fullscreen was specified, this needs to be done before
|
if (!output->parent.surface)
|
||||||
* enable to get the proper mode */
|
|
||||||
if (!b->fullscreen)
|
|
||||||
ret = wayland_backend_create_output_surface(output);
|
ret = wayland_backend_create_output_surface(output);
|
||||||
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
@@ -1132,7 +1122,6 @@ wayland_output_enable(struct weston_output *base)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_output:
|
err_output:
|
||||||
if (!b->fullscreen)
|
|
||||||
wayland_backend_destroy_output_surface(output);
|
wayland_backend_destroy_output_surface(output);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user