summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Preisinger <alexander.preisinger@gmail.com>2014-08-13 22:32:22 +0200
committerAlessandro Ghedini <alessandro@ghedini.me>2014-08-13 23:00:26 +0200
commit8664dc3c47f73beead80f4142b225e64ed09b55d (patch)
treeb02734af70661c47d1782c50f99648a3179b989d
parent51ce5358223beae9901c85b52c62c30efeebedc4 (diff)
downloadmpv-8664dc3c47f73beead80f4142b225e64ed09b55d.tar.bz2
mpv-8664dc3c47f73beead80f4142b225e64ed09b55d.tar.xz
wayland: pointer interface is created after theme
Just always load the theme. It gets freed properly and dosn't bother anyone. Fixes #1012. CC: @mpv-player/stable
-rw-r--r--video/out/wayland_common.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 0a02ee2bf8..36c6fc0d4b 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -819,20 +819,15 @@ static bool create_cursor (struct vo_wayland_state *wl)
return false;
}
- if (wl->cursor.pointer) {
- // only create cursor surface if a pointer interface is available
- // without this check it leads to problems with compositor which don't
- // have pointer interfaces
- wl->cursor.surface =
- wl_compositor_create_surface(wl->display.compositor);
-
- if (!wl->cursor.surface)
- return false;
+ wl->cursor.surface =
+ wl_compositor_create_surface(wl->display.compositor);
- wl->cursor.theme = wl_cursor_theme_load(NULL, 32, wl->display.shm);
- wl->cursor.default_cursor = wl_cursor_theme_get_cursor(wl->cursor.theme,
- "left_ptr");
- }
+ if (!wl->cursor.surface)
+ return false;
+
+ wl->cursor.theme = wl_cursor_theme_load(NULL, 32, wl->display.shm);
+ wl->cursor.default_cursor = wl_cursor_theme_get_cursor(wl->cursor.theme,
+ "left_ptr");
return true;
}