diff options
author | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-10-09 02:08:36 +0100 |
---|---|---|
committer | Rostislav Pehlivanov <atomnuker@gmail.com> | 2017-10-09 02:23:04 +0100 |
commit | 4c7c8daf9ccea7ac6a9089be362d254771c50811 (patch) | |
tree | 38503f6ba9e44b36cd5cf74452b91e68aed495bf /video/out/vulkan/context_wayland.c | |
parent | 318e2e53f0ff6c466f781378bbacea3e2b8dd8bb (diff) | |
download | mpv-4c7c8daf9ccea7ac6a9089be362d254771c50811.tar.bz2 mpv-4c7c8daf9ccea7ac6a9089be362d254771c50811.tar.xz |
wayland_common: implement output tracking, cleanups and bugfixes
This commit:
- Implements output tracking (e.g. monitor plug/unplug)
- Creates the surface during registry (no other dependencies)
- Queues the callback immediately after surface creation
- Cleaner and better event handling (functions return directly)
- Better reconfigure handling (resizes reduced to 1 during init)
- Don't unnecessarily resize (if dimensions match)
Apart from that fixes 2 potential memory leaks (mime type and window
title), 2 string ownership issues (output name and make need to be
dup'd), fixes some style issues (switches were indented) and finally
adds messages when disabling/enabling idle inhibition.
The callback setter function was removed in preparation for the commit
which will use the frame event cb because it was unnecessary.
Diffstat (limited to 'video/out/vulkan/context_wayland.c')
-rw-r--r-- | video/out/vulkan/context_wayland.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c index 67a3383ca3..92ee7aa1a9 100644 --- a/video/out/vulkan/context_wayland.c +++ b/video/out/vulkan/context_wayland.c @@ -70,8 +70,6 @@ static bool wayland_vk_init(struct ra_ctx *ctx) if (!ra_vk_ctx_init(ctx, vk, VK_PRESENT_MODE_MAILBOX_KHR)) goto error; - vo_wayland_set_cb_exec(ctx->vo, NULL, NULL); - return true; error: @@ -83,7 +81,7 @@ static void resize(struct ra_ctx *ctx) { struct vo_wayland_state *wl = ctx->vo->wl; - MP_VERBOSE(wl, "Handling resizing on the vk side\n"); + MP_VERBOSE(wl, "Handling resize on the vk side\n"); const int32_t width = wl->scaling*mp_rect_w(wl->geometry); const int32_t height = wl->scaling*mp_rect_h(wl->geometry); |