Commit 8ae8abfe authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: pass window state control directly to the window

parent ef6353b6
...@@ -87,7 +87,6 @@ VLC_API bool vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures); ...@@ -87,7 +87,6 @@ VLC_API bool vout_ManageDisplay(vout_display_t *, bool allow_reset_pictures);
VLC_API void vout_SetDisplayFullscreen(vout_display_t *, bool is_fullscreen); VLC_API void vout_SetDisplayFullscreen(vout_display_t *, bool is_fullscreen);
VLC_API void vout_SetDisplayFilled(vout_display_t *, bool is_filled); VLC_API void vout_SetDisplayFilled(vout_display_t *, bool is_filled);
VLC_API void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den); VLC_API void vout_SetDisplayZoom(vout_display_t *, unsigned num, unsigned den);
void vout_SetWindowState(vout_display_t *, unsigned state);
VLC_API void vout_SetDisplayAspect(vout_display_t *, unsigned dar_num, unsigned dar_den); VLC_API void vout_SetDisplayAspect(vout_display_t *, unsigned dar_num, unsigned dar_den);
VLC_API void vout_SetDisplayCrop(vout_display_t *, unsigned crop_num, unsigned crop_den, unsigned left, unsigned top, int right, int bottom); VLC_API void vout_SetDisplayCrop(vout_display_t *, unsigned crop_num, unsigned crop_den, unsigned left, unsigned top, int right, int bottom);
......
...@@ -1222,18 +1222,6 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den) ...@@ -1222,18 +1222,6 @@ void vout_SetDisplayZoom(vout_display_t *vd, unsigned num, unsigned den)
} }
} }
void vout_SetWindowState(vout_display_t *vd, unsigned state)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
vlc_mutex_lock(&osys->lock);
if (osys->wm_state != state) {
osys->ch_wm_state = true;
osys->wm_state = state;
}
vlc_mutex_unlock(&osys->lock);
}
void vout_SetDisplayAspect(vout_display_t *vd, unsigned dar_num, unsigned dar_den) void vout_SetDisplayAspect(vout_display_t *vd, unsigned dar_num, unsigned dar_den)
{ {
vout_display_owner_sys_t *osys = vd->owner.sys; vout_display_owner_sys_t *osys = vd->owner.sys;
......
...@@ -1265,7 +1265,15 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen) ...@@ -1265,7 +1265,15 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
static void ThreadChangeWindowState(vout_thread_t *vout, unsigned state) static void ThreadChangeWindowState(vout_thread_t *vout, unsigned state)
{ {
vout_SetWindowState(vout->p->display.vd, state); vout_window_t *window = vout->p->window;
if (window != NULL)
vout_window_SetState(window, state);
else
if (vout->p->display.vd != NULL)
/* FIXME: remove this event, fix MSW and OS/2 window providers */
vout_display_SendEvent(vout->p->display.vd,
VOUT_DISPLAY_EVENT_WINDOW_STATE, state);
} }
static void ThreadChangeDisplayFilled(vout_thread_t *vout, bool is_filled) static void ThreadChangeDisplayFilled(vout_thread_t *vout, bool is_filled)
......
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