p_vout->p_sys->rect_parent = rect_parent;
/* This one is to force the update even if only
- * the position has changed */
+ * the position has changed */
SetWindowPos( p_vout->p_sys->hwnd, 0, 1, 1,
rect_parent.right - rect_parent.left,
rect_parent.bottom - rect_parent.top, 0 );
/* Normal window */
window_placement.showCmd = SW_SHOWNORMAL;
+
+ /* Make sure the mouse cursor is displayed */
+ PostMessage( p_vout->p_sys->hwnd, WM_VLC_SHOW_MOUSE, 0, 0 );
}
/* Change window style, borders and title bar */
/*
* Pointer change
*/
- if( (!p_vout->p_sys->b_cursor_hidden) &&
- ( (mdate() - p_vout->p_sys->i_lastmoved) > 5000000 ) )
+ if( p_vout->b_fullscreen && !p_vout->p_sys->b_cursor_hidden &&
+ (mdate() - p_vout->p_sys->i_lastmoved) > 5000000 )
{
POINT point;
RECT rect;
GetCursorPos( &point );
if( PtInRect( &rect, point ) )
{
- p_vout->p_sys->b_cursor_hidden = VLC_TRUE;
PostMessage( p_vout->p_sys->hwnd, WM_VLC_HIDE_MOUSE, 0, 0 );
}
else
break;
case WM_VLC_HIDE_MOUSE:
+ if( p_event->p_vout->p_sys->b_cursor_hidden ) break;
+ p_event->p_vout->p_sys->b_cursor_hidden = VLC_TRUE;
GetCursorPos( &old_mouse_pos );
ShowCursor( FALSE );
break;
+ case WM_VLC_SHOW_MOUSE:
+ if( !p_event->p_vout->p_sys->b_cursor_hidden ) break;
+ p_event->p_vout->p_sys->b_cursor_hidden = VLC_FALSE;
+ GetCursorPos( &old_mouse_pos );
+ ShowCursor( TRUE );
+ break;
+
case WM_LBUTTONDOWN:
var_Get( p_event->p_vout, "mouse-button-down", &val );
val.i_int |= 1;
* Constants
*****************************************************************************/
#define WM_VLC_HIDE_MOUSE WM_APP
-#define WM_VLC_CREATE_VIDEO_WIN WM_APP + 1
-#define WM_VLC_DESTROY_VIDEO_WIN WM_APP + 2
+#define WM_VLC_SHOW_MOUSE WM_APP + 1
+#define WM_VLC_CREATE_VIDEO_WIN WM_APP + 2
#define WM_VLC_CHANGE_TEXT WM_APP + 3
#define IDM_TOGGLE_ON_TOP WM_USER + 1
#define DX_POSITION_CHANGE 0x1000