summaryrefslogtreecommitdiffstats
path: root/Gui
diff options
context:
space:
mode:
authorvayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-09 18:22:57 +0000
committervayne <vayne@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-09 18:22:57 +0000
commita649e7852987de941fb279891160a7fbf91ae367 (patch)
tree91e98e08e6d3680e7bf80b782c60a2a3e9041b1b /Gui
parentddc392e2b465c02bb72fc5a411bd94842f905ddc (diff)
downloadmpv-a649e7852987de941fb279891160a7fbf91ae367.tar.bz2
mpv-a649e7852987de941fb279891160a7fbf91ae367.tar.xz
added a simple timer to hide the mouse when in fullscreen mode.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20138 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'Gui')
-rw-r--r--Gui/win32/dialogs.h1
-rw-r--r--Gui/win32/gui.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/Gui/win32/dialogs.h b/Gui/win32/dialogs.h
index ac80f2c058..5651f5da70 100644
--- a/Gui/win32/dialogs.h
+++ b/Gui/win32/dialogs.h
@@ -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
diff --git a/Gui/win32/gui.c b/Gui/win32/gui.c
index a795d0bd69..afe8549ad7 100644
--- a/Gui/win32/gui.c
+++ b/Gui/win32/gui.c
@@ -566,6 +566,18 @@ static LRESULT CALLBACK SubProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
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 LRESULT CALLBACK SubProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM l
static uint32_t rect_height;
RECT rd;
POINT pt;
- while(ShowCursor(TRUE) <= 0){}
pt.x = 0;
pt.y = 0;
GetClientRect(hWnd, &rd);