[vlc-devel] [PATCH] Don't keep VLC on top when paused
Edward Wang
edward.c.wang at compdigitec.com
Wed Dec 28 03:30:52 CET 2011
Have the "always on top" preference only take effect while a movie is playing. When not playing VLC will act like any other window.
Fixes #4689 if committed.
Thanks,
Edward Wang
---
src/video_output/video_output.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index a8e4e24..322c9f8 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -1193,6 +1193,11 @@ static void ThreadChangePause(vout_thread_t *vout, bool is_paused, mtime_t date)
{
assert(!vout->p->pause.is_on || !is_paused);
+ /* Only stay on top if not paused */
+ bool is_on_top = var_GetBool( vout, "video-on-top" );
+ vout_SetWindowState(vout->p->display.vd, (!is_paused && is_on_top) ? VOUT_WINDOW_STATE_ABOVE
+ : VOUT_WINDOW_STATE_NORMAL );
+
if (vout->p->pause.is_on) {
const mtime_t duration = date - vout->p->pause.date;
--
1.7.5.4
More information about the vlc-devel
mailing list