diff options
-rw-r--r-- | video/out/x11_common.c | 1 | ||||
-rw-r--r-- | video/out/x11_common.h | 5 |
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; |