diff options
-rw-r--r-- | hw/xwayland/xwayland-output.c | 12 | ||||
-rw-r--r-- | hw/xwayland/xwayland.c | 2 | ||||
-rw-r--r-- | hw/xwayland/xwayland.h | 2 |
3 files changed, 12 insertions, 4 deletions
diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index 39b93dc84..ef3b6f67c 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -292,20 +292,26 @@ err: void xwl_output_destroy(struct xwl_output *xwl_output) { + wl_output_destroy(xwl_output->output); + free(xwl_output); +} + +void +xwl_output_remove(struct xwl_output *xwl_output) +{ struct xwl_output *it; struct xwl_screen *xwl_screen = xwl_output->xwl_screen; int width = 0, height = 0; - wl_output_destroy(xwl_output->output); - xorg_list_del(&xwl_output->link); RRCrtcDestroy(xwl_output->randr_crtc); RROutputDestroy(xwl_output->randr_output); + xorg_list_del(&xwl_output->link); xorg_list_for_each_entry(it, &xwl_screen->output_list, link) output_get_new_size(it, &height, &width); update_screen_size(xwl_output, width, height); - free(xwl_output); + xwl_output_destroy(xwl_output); } static Bool diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 97d998ead..a41b619bf 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -453,7 +453,7 @@ global_remove(void *data, struct wl_registry *registry, uint32_t name) xorg_list_for_each_entry_safe(xwl_output, tmp_xwl_output, &xwl_screen->output_list, link) { if (xwl_output->server_output_id == name) { - xwl_output_destroy(xwl_output); + xwl_output_remove(xwl_output); break; } } diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index aaaa43174..8db8df589 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -174,6 +174,8 @@ struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen, void xwl_output_destroy(struct xwl_output *xwl_output); +void xwl_output_remove(struct xwl_output *xwl_output); + RRModePtr xwayland_cvt(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, Bool Interlaced); |