[vlc-commits] vout: pass window state control directly to the window
Rémi Denis-Courmont
git at videolan.org
Thu Oct 16 19:26:06 CEST 2014
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Oct 12 19:08:46 2014 +0300| [8ae8abfe82b730d71413462f1c633de0b852f7ec] | committer: Rémi Denis-Courmont
vout: pass window state control directly to the window
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8ae8abfe82b730d71413462f1c633de0b852f7ec
---
include/vlc_vout_wrapper.h | 1 -
src/video_output/display.c | 12 ------------
src/video_output/video_output.c | 10 +++++++++-
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/include/vlc_vout_wrapper.h b/include/vlc_vout_wrapper.h
index a1ee097..4e2994b 100644
--- a/include/vlc_vout_wrapper.h
+++ b/include/vlc_vout_wrapper.h
@@ -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_SetDisplayFilled(vout_display_t *, bool is_filled);
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_SetDisplayCrop(vout_display_t *, unsigned crop_num, unsigned crop_den, unsigned left, unsigned top, int right, int bottom);
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 3f42d0f..b0a5070 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -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)
{
vout_display_owner_sys_t *osys = vd->owner.sys;
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index 5d93e92..c5f360e 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1265,7 +1265,15 @@ static void ThreadChangeFullscreen(vout_thread_t *vout, bool fullscreen)
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)
More information about the vlc-commits
mailing list