Commit 6034b5c5 authored by Laurent Aimar's avatar Laurent Aimar

Fixed invalid mouse cursor state on win32 (close #3675).

As a side effect, window class names are now uniques (process wide)
allowing to unregister them and so to unload properly the msw vouts.
parent 5422c4fa
...@@ -84,9 +84,6 @@ int CommonInit(vout_display_t *vd) ...@@ -84,9 +84,6 @@ int CommonInit(vout_display_t *vd)
var_Create(vd, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT); var_Create(vd, "video-title", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
var_Create(vd, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT); var_Create(vd, "video-deco", VLC_VAR_BOOL | VLC_VAR_DOINHERIT);
/* FIXME remove mouse hide from msw */
var_Create(vd, "mouse-hide-timeout", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT);
/* */ /* */
sys->event = EventThreadCreate(vd); sys->event = EventThreadCreate(vd);
if (!sys->event) if (!sys->event)
...@@ -191,9 +188,6 @@ void CommonManage(vout_display_t *vd) ...@@ -191,9 +188,6 @@ void CommonManage(vout_display_t *vd)
/* HasMoved means here resize or move */ /* HasMoved means here resize or move */
if (EventThreadGetAndResetHasMoved(sys->event)) if (EventThreadGetAndResetHasMoved(sys->event))
UpdateRects(vd, NULL, NULL, false); UpdateRects(vd, NULL, NULL, false);
/* Pointer change */
EventThreadMouseAutoHide(sys->event);
} }
/** /**
...@@ -551,9 +545,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -551,9 +545,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
SetWindowPlacement(hwnd, &window_placement); SetWindowPlacement(hwnd, &window_placement);
ShowWindow(hwnd, SW_SHOWNORMAL); ShowWindow(hwnd, SW_SHOWNORMAL);
} }
/* Make sure the mouse cursor is displayed */
EventThreadMouseShow(sys->event);
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
...@@ -630,8 +621,10 @@ int CommonControl(vout_display_t *vd, int query, va_list args) ...@@ -630,8 +621,10 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
return CommonControlSetFullscreen(vd, cfg->is_fullscreen); return CommonControlSetFullscreen(vd, cfg->is_fullscreen);
} }
case VOUT_DISPLAY_RESET_PICTURES:
case VOUT_DISPLAY_HIDE_MOUSE: case VOUT_DISPLAY_HIDE_MOUSE:
EventThreadMouseHide(sys->event);
return VLC_SUCCESS;
case VOUT_DISPLAY_RESET_PICTURES:
assert(0); assert(0);
default: default:
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -73,9 +73,6 @@ vlc_module_begin () ...@@ -73,9 +73,6 @@ vlc_module_begin ()
add_shortcut("direct3d") add_shortcut("direct3d")
set_callbacks(OpenVideoVista, Close) set_callbacks(OpenVideoVista, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library()
add_submodule() add_submodule()
set_description(N_("Direct3D video output (XP)")) set_description(N_("Direct3D video output (XP)"))
set_capability("vout display", 70) set_capability("vout display", 70)
...@@ -84,14 +81,6 @@ vlc_module_begin () ...@@ -84,14 +81,6 @@ vlc_module_begin ()
vlc_module_end () vlc_module_end ()
#if 0 /* FIXME */
/* check if we registered a window class because we need to
* unregister it */
WNDCLASS wndclass;
if (GetClassInfo(GetModuleHandle(NULL), "VLC DirectX", &wndclass))
UnregisterClass("VLC DirectX", GetModuleHandle(NULL));
#endif
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
...@@ -165,7 +154,7 @@ static int Open(vlc_object_t *object) ...@@ -165,7 +154,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info; vout_display_info_t info = vd->info;
info.is_slow = true; info.is_slow = true;
info.has_double_click = true; info.has_double_click = true;
info.has_hide_mouse = true; info.has_hide_mouse = false;
info.has_pictures_invalid = true; info.has_pictures_invalid = true;
info.has_event_thread = true; info.has_event_thread = true;
......
...@@ -118,19 +118,8 @@ vlc_module_begin() ...@@ -118,19 +118,8 @@ vlc_module_begin()
set_capability("vout display", 100) set_capability("vout display", 100)
add_shortcut("directx") add_shortcut("directx")
set_callbacks(Open, Close) set_callbacks(Open, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library()
vlc_module_end() vlc_module_end()
#if 0 /* FIXME */
/* check if we registered a window class because we need to
* unregister it */
WNDCLASS wndclass;
if (GetClassInfo(GetModuleHandle(NULL), "VLC DirectX", &wndclass))
UnregisterClass("VLC DirectX", GetModuleHandle(NULL));
#endif
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
...@@ -220,7 +209,7 @@ static int Open(vlc_object_t *object) ...@@ -220,7 +209,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info; vout_display_info_t info = vd->info;
info.is_slow = true; info.is_slow = true;
info.has_double_click = true; info.has_double_click = true;
info.has_hide_mouse = true; info.has_hide_mouse = false;
info.has_pictures_invalid = true; info.has_pictures_invalid = true;
info.has_event_thread = true; info.has_event_thread = true;
......
This diff is collapsed.
...@@ -49,8 +49,7 @@ void EventThreadDestroy( event_thread_t * ); ...@@ -49,8 +49,7 @@ void EventThreadDestroy( event_thread_t * );
int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * ); int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * );
void EventThreadStop( event_thread_t * ); void EventThreadStop( event_thread_t * );
void EventThreadMouseAutoHide( event_thread_t * ); void EventThreadMouseHide( event_thread_t * );
void EventThreadMouseShow( event_thread_t * );
void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback ); void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
int EventThreadGetWindowStyle( event_thread_t * ); int EventThreadGetWindowStyle( event_thread_t * );
void EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_moved, bool *pb_resized, void EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_moved, bool *pb_resized,
......
...@@ -57,20 +57,8 @@ vlc_module_begin() ...@@ -57,20 +57,8 @@ vlc_module_begin()
add_shortcut("glwin32") add_shortcut("glwin32")
add_shortcut("opengl") add_shortcut("opengl")
set_callbacks(Open, Close) set_callbacks(Open, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library ()
vlc_module_end() vlc_module_end()
#if 0 /* FIXME */
/* check if we registered a window class because we need to
* unregister it */
WNDCLASS wndclass;
if(GetClassInfo(GetModuleHandle(NULL), "VLC DirectX", &wndclass))
UnregisterClass("VLC DirectX", GetModuleHandle(NULL));
#endif
/***************************************************************************** /*****************************************************************************
* Local prototypes. * Local prototypes.
*****************************************************************************/ *****************************************************************************/
...@@ -133,7 +121,7 @@ static int Open(vlc_object_t *object) ...@@ -133,7 +121,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info; vout_display_info_t info = vd->info;
info.has_double_click = true; info.has_double_click = true;
info.has_hide_mouse = true; info.has_hide_mouse = false;
info.has_pictures_invalid = true; info.has_pictures_invalid = true;
info.has_event_thread = true; info.has_event_thread = true;
......
...@@ -134,7 +134,7 @@ static int Open(vlc_object_t *object) ...@@ -134,7 +134,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info; vout_display_info_t info = vd->info;
info.is_slow = false; info.is_slow = false;
info.has_double_click = true; info.has_double_click = true;
info.has_hide_mouse = true; info.has_hide_mouse = false;
info.has_pictures_invalid = true; info.has_pictures_invalid = true;
/* */ /* */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment