[vlc-commits] kva: assume VOUT_DISPLAY_CHANGE_WINDOW_STATE is only called to set video on top
Steve Lhomme
git at videolan.org
Fri Sep 11 13:35:24 CEST 2020
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Sep 2 11:16:45 2020 +0200| [770e4947c102bbe961fb6291e507dfd00285dea9] | committer: Steve Lhomme
kva: assume VOUT_DISPLAY_CHANGE_WINDOW_STATE is only called to set video on top
It's supposed to be handled in the window, not in the display module.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=770e4947c102bbe961fb6291e507dfd00285dea9
---
include/vlc_vout_display.h | 2 +-
modules/video_output/kva.c | 8 ++------
src/video_output/display.c | 3 +--
3 files changed, 4 insertions(+), 9 deletions(-)
diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index ad78cc6c95..a20c0c9745 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -165,7 +165,7 @@ enum vout_display_query {
VOUT_DISPLAY_CHANGE_FULLSCREEN VLC_DEPRECATED_ENUM, /* bool fs */
/* Ask the module to acknowledge/refuse the window management state change
* after being requested externally or by VOUT_DISPLAY_WINDOW_STATE */
- VOUT_DISPLAY_CHANGE_WINDOW_STATE VLC_DEPRECATED_ENUM, /* unsigned state */
+ VOUT_DISPLAY_CHANGE_WINDOW_STATE VLC_DEPRECATED_ENUM,
#endif
/**
* Notifies a change in display size.
diff --git a/modules/video_output/kva.c b/modules/video_output/kva.c
index 18fcb61098..c2dee74e59 100644
--- a/modules/video_output/kva.c
+++ b/modules/video_output/kva.c
@@ -407,13 +407,9 @@ static int Control( vout_display_t *vd, int query, va_list args )
case VOUT_DISPLAY_CHANGE_WINDOW_STATE:
{
- const unsigned state = va_arg( args, unsigned );
- const bool is_on_top = (state & VOUT_WINDOW_STATE_ABOVE) != 0;
+ WinSetWindowPos( sys->frame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER );
- if( is_on_top )
- WinSetWindowPos( sys->frame, HWND_TOP, 0, 0, 0, 0, SWP_ZORDER );
-
- sys->is_on_top = is_on_top;
+ sys->is_on_top = true;
return VLC_SUCCESS;
}
diff --git a/src/video_output/display.c b/src/video_output/display.c
index b340b4711e..ffe550ed5f 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -756,8 +756,7 @@ vout_display_t *vout_display_New(vlc_object_t *parent,
osys->cfg.is_fullscreen = true;
if (var_InheritBool(parent, "video-on-top"))
- vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE,
- (unsigned)VOUT_WINDOW_STATE_ABOVE);
+ vout_display_Control(vd, VOUT_DISPLAY_CHANGE_WINDOW_STATE);
#endif
if (VoutDisplayCreateRender(vd)) {
More information about the vlc-commits
mailing list