Mercurial > mplayer.hg
changeset 20132:a8aa764559fa
added a simple timer to hide the mouse when in fullscreen mode.
author | vayne |
---|---|
date | Mon, 09 Oct 2006 18:22:57 +0000 |
parents | a16eef9ffef6 |
children | 6d6c0840113f |
files | Gui/win32/dialogs.h Gui/win32/gui.c |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Gui/win32/dialogs.h Mon Oct 09 18:21:50 2006 +0000 +++ b/Gui/win32/dialogs.h Mon Oct 09 18:22:57 2006 +0000 @@ -119,6 +119,7 @@ #define ID_ASPECT3 85 #define ID_ASPECT4 86 #define ID_SUBWINDOW 87 +#define ID_TIMER 88 /* gtk emulation */ #define GTK_MB_FATAL 0x1
--- a/Gui/win32/gui.c Mon Oct 09 18:21:50 2006 +0000 +++ b/Gui/win32/gui.c Mon Oct 09 18:22:57 2006 +0000 @@ -566,6 +566,18 @@ mplayer_put_key(MOUSE_BTN6_DBL); break; } + case WM_TIMER: + { + if(fullscreen) while(ShowCursor(FALSE) >= 0){} + KillTimer(hWnd, ID_TIMER); + return 0; + } + case WM_MOUSEMOVE: + { + ShowCursor(TRUE); + SetTimer(hWnd, ID_TIMER, 3000, (TIMERPROC) NULL); + break; + } case WM_WINDOWPOSCHANGED: { int tmpheight=0; @@ -573,7 +585,6 @@ static uint32_t rect_height; RECT rd; POINT pt; - while(ShowCursor(TRUE) <= 0){} pt.x = 0; pt.y = 0; GetClientRect(hWnd, &rd);