From: Gildas Bazin Date: Fri, 23 Apr 2004 15:35:02 +0000 (+0000) Subject: * modules/video_output/directx/directx.c: I think I finally have the mouse autohiding... X-Git-Tag: 0.7.2~298 X-Git-Url: https://git.videolan.org/gitweb.cgi/vlc.git/?p=vlc.git;p=vlc.git;a=commitdiff_plain;h=5327b8479eb0dbff9bf042d111b594e376674231;ds=sidebyside * modules/video_output/directx/directx.c: I think I finally have the mouse autohiding feature right. --- diff --git a/modules/video_output/directx/directx.c b/modules/video_output/directx/directx.c index 7386e5c119..f9370e47c4 100644 --- a/modules/video_output/directx/directx.c +++ b/modules/video_output/directx/directx.c @@ -566,15 +566,12 @@ static int Manage( vout_thread_t *p_vout ) (mdate() - p_vout->p_sys->i_lastmoved) > 5000000 ) { POINT point; - RECT rect; + HWND hwnd; /* Hide the cursor only if it is inside our window */ - GetClientRect( p_vout->p_sys->hwnd, &rect ); - point.x = point.y = 0; - ClientToScreen( p_vout->p_sys->hwnd, &point ); - OffsetRect( &rect, point.x, point.y ); GetCursorPos( &point ); - if( PtInRect( &rect, point ) ) + hwnd = WindowFromPoint(point); + if( hwnd == p_vout->p_sys->hwnd || hwnd == p_vout->p_sys->hvideownd ) { PostMessage( p_vout->p_sys->hwnd, WM_VLC_HIDE_MOUSE, 0, 0 ); }