Commit e290c329 authored by Laurent Aimar's avatar Laurent Aimar Committed by Jean-Baptiste Kempf

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.
(cherry picked from commit 6034b5c5)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 5beedc23
...@@ -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)
...@@ -195,9 +192,6 @@ void CommonManage(vout_display_t *vd) ...@@ -195,9 +192,6 @@ void CommonManage(vout_display_t *vd)
/* */ /* */
if (EventThreadGetAndResetHasMoved(sys->event)) if (EventThreadGetAndResetHasMoved(sys->event))
UpdateRects(vd, NULL, NULL, false); UpdateRects(vd, NULL, NULL, false);
/* Pointer change */
EventThreadMouseAutoHide(sys->event);
} }
/** /**
...@@ -555,9 +549,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen) ...@@ -555,9 +549,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;
} }
...@@ -637,8 +628,10 @@ int CommonControl(vout_display_t *vd, int query, va_list args) ...@@ -637,8 +628,10 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
return VLC_SUCCESS; return VLC_SUCCESS;
} }
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,23 +73,12 @@ vlc_module_begin () ...@@ -73,23 +73,12 @@ vlc_module_begin ()
add_shortcut("direct3d_xp") add_shortcut("direct3d_xp")
set_callbacks(OpenVideoXP, Close) set_callbacks(OpenVideoXP, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library()
add_submodule() add_submodule()
set_capability("vout display", 150) set_capability("vout display", 150)
add_shortcut("direct3d_vista") add_shortcut("direct3d_vista")
set_callbacks(OpenVideoVista, Close) set_callbacks(OpenVideoVista, Close)
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.
*****************************************************************************/ *****************************************************************************/
...@@ -163,7 +152,7 @@ static int Open(vlc_object_t *object) ...@@ -163,7 +152,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;
/* Interaction */ /* Interaction */
......
...@@ -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;
/* Interaction TODO support starting with wallpaper mode */ /* Interaction TODO support starting with wallpaper mode */
......
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;
/* Setup vout_display now that everything is fine */ /* Setup vout_display now that everything is fine */
......
...@@ -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