summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorPhilip Sequeira <phsequei@gmail.com>2019-03-11 00:37:24 -0400
committersfan5 <sfan5@live.de>2019-03-16 21:17:32 +0100
commit98eea65605e98d3e6febcd1780b68595670d7183 (patch)
tree212c19acda646639fd1a11d9c178f64128d1a92d /video/out
parentdd83b66652d93e5422757f569b084867a9052e48 (diff)
downloadmpv-98eea65605e98d3e6febcd1780b68595670d7183.tar.bz2
mpv-98eea65605e98d3e6febcd1780b68595670d7183.tar.xz
x11: fix cursor hiding initial state
Regression from 8e3308d687c3acdd0d572015b06efd5b492d93ee. Broken cases were: * --no-cursor-autohide acted like --cursor-autohide=always. * --cursor-autohide-fs-only always hid the cursor if starting non-fullscreen; entering fullscreen at least once fixed it.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/x11_common.c1
-rw-r--r--video/out/x11_common.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index f01d7e2610..467fa827ac 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -1425,6 +1425,7 @@ static void vo_x11_create_window(struct vo *vo, XVisualInfo *vis,
XSetWMProtocols(x11->display, x11->window, protos, 1);
x11->mouse_cursor_set = false;
+ x11->mouse_cursor_visible = true;
vo_update_cursor(vo);
if (x11->xim) {
diff --git a/video/out/x11_common.h b/video/out/x11_common.h
index 608534052c..ca01f61b0c 100644
--- a/video/out/x11_common.h
+++ b/video/out/x11_common.h
@@ -88,8 +88,9 @@ struct vo_x11_state {
bool pseudo_mapped; // not necessarily mapped, but known window size
int fs; // whether we assume the window is in fullscreen mode
- bool mouse_cursor_visible;
- bool mouse_cursor_set;
+ bool mouse_cursor_visible; // whether we want the cursor to be visible (only
+ // takes effect when the window is focused)
+ bool mouse_cursor_set; // whether the cursor is *currently* *hidden*
bool has_focus;
long orig_layer;