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)
var_Create(vd, "video-title", VLC_VAR_STRING | 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);
if (!sys->event)
......@@ -191,9 +188,6 @@ void CommonManage(vout_display_t *vd)
/* HasMoved means here resize or move */
if (EventThreadGetAndResetHasMoved(sys->event))
UpdateRects(vd, NULL, NULL, false);
/* Pointer change */
EventThreadMouseAutoHide(sys->event);
}
/**
......@@ -551,9 +545,6 @@ static int CommonControlSetFullscreen(vout_display_t *vd, bool is_fullscreen)
SetWindowPlacement(hwnd, &window_placement);
ShowWindow(hwnd, SW_SHOWNORMAL);
}
/* Make sure the mouse cursor is displayed */
EventThreadMouseShow(sys->event);
}
return VLC_SUCCESS;
}
......@@ -630,8 +621,10 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
return CommonControlSetFullscreen(vd, cfg->is_fullscreen);
}
case VOUT_DISPLAY_RESET_PICTURES:
case VOUT_DISPLAY_HIDE_MOUSE:
EventThreadMouseHide(sys->event);
return VLC_SUCCESS;
case VOUT_DISPLAY_RESET_PICTURES:
assert(0);
default:
return VLC_EGENERIC;
......
......@@ -73,9 +73,6 @@ vlc_module_begin ()
add_shortcut("direct3d")
set_callbacks(OpenVideoVista, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library()
add_submodule()
set_description(N_("Direct3D video output (XP)"))
set_capability("vout display", 70)
......@@ -84,14 +81,6 @@ vlc_module_begin ()
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.
*****************************************************************************/
......@@ -165,7 +154,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info;
info.is_slow = true;
info.has_double_click = true;
info.has_hide_mouse = true;
info.has_hide_mouse = false;
info.has_pictures_invalid = true;
info.has_event_thread = true;
......
......@@ -118,19 +118,8 @@ vlc_module_begin()
set_capability("vout display", 100)
add_shortcut("directx")
set_callbacks(Open, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library()
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.
*****************************************************************************/
......@@ -220,7 +209,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info;
info.is_slow = true;
info.has_double_click = true;
info.has_hide_mouse = true;
info.has_hide_mouse = false;
info.has_pictures_invalid = true;
info.has_event_thread = true;
......
This diff is collapsed.
......@@ -49,8 +49,7 @@ void EventThreadDestroy( event_thread_t * );
int EventThreadStart( event_thread_t *, event_hwnd_t *, const event_cfg_t * );
void EventThreadStop( event_thread_t * );
void EventThreadMouseAutoHide( event_thread_t * );
void EventThreadMouseShow( event_thread_t * );
void EventThreadMouseHide( event_thread_t * );
void EventThreadUpdateTitle( event_thread_t *, const char *psz_fallback );
int EventThreadGetWindowStyle( event_thread_t * );
void EventThreadUpdateWindowPosition( event_thread_t *, bool *pb_moved, bool *pb_resized,
......
......@@ -57,20 +57,8 @@ vlc_module_begin()
add_shortcut("glwin32")
add_shortcut("opengl")
set_callbacks(Open, Close)
/* FIXME: Hack to avoid unregistering our window class */
cannot_unload_broken_library ()
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.
*****************************************************************************/
......@@ -133,7 +121,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info;
info.has_double_click = true;
info.has_hide_mouse = true;
info.has_hide_mouse = false;
info.has_pictures_invalid = true;
info.has_event_thread = true;
......
......@@ -134,7 +134,7 @@ static int Open(vlc_object_t *object)
vout_display_info_t info = vd->info;
info.is_slow = false;
info.has_double_click = true;
info.has_hide_mouse = true;
info.has_hide_mouse = false;
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