diff options
author | wm4 <wm4@nowhere> | 2013-05-17 00:10:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-05-26 16:44:19 +0200 |
commit | 8fe357380ee9c784deb67423f8debbe5b5524016 (patch) | |
tree | e24634abed6ea047e7e57cba70c4277bcef0f8fb /video | |
parent | 6ab719f6983ee1531143fcfb521dadcf8a3f50ed (diff) | |
download | mpv-8fe357380ee9c784deb67423f8debbe5b5524016.tar.bz2 mpv-8fe357380ee9c784deb67423f8debbe5b5524016.tar.xz |
w32: use VOCTRL_SET_CURSOR_VISIBILITY
This didn't even implement --cursor-autohide. Now it does, and the
behavior of the VOs under Windows change accordingly.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/w32_common.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 5903a26f94..42a158a42f 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -417,11 +417,6 @@ static int reinit_window_state(struct vo *vo) layer = HWND_TOPMOST; // xxx not sure if this can trigger any unwanted messages (WM_MOVE/WM_SIZE) - if (vo->opts->fs) { - while (ShowCursor(0) >= 0) /**/ ; - } else { - while (ShowCursor(1) < 0) /**/ ; - } updateScreenProperties(vo); if (vo->opts->fs) { @@ -695,6 +690,12 @@ int vo_w32_control(struct vo *vo, int *events, int request, void *arg) case VOCTRL_UPDATE_SCREENINFO: w32_update_xinerama_info(vo); return VO_TRUE; + case VOCTRL_SET_CURSOR_VISIBILITY: + if (*(bool *)arg) { + while (ShowCursor(1) < 0) { } + } else { + while (ShowCursor(0) >= 0) { } + } } return VO_NOTIMPL; } @@ -712,7 +713,7 @@ void vo_w32_uninit(struct vo *vo) mp_msg(MSGT_VO, MSGL_V, "vo: win32: uninit\n"); if (!w32) return; - ShowCursor(1); + while (ShowCursor(1) < 0) { } DestroyWindow(w32->window); UnregisterClassW(classname, 0); talloc_free(w32); |