[vlc-commits] macosx: fix video-wallpaper mode by ignoring core events
David Fuhrmann
git at videolan.org
Sat Mar 14 16:02:54 CET 2015
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Mar 14 15:59:26 2015 +0100| [b8c639dd6c19dd8ecdf0804836c3dd0cf58bb217] | committer: David Fuhrmann
macosx: fix video-wallpaper mode by ignoring core events
wallpaper mode is more complicated than setting fullscreen and
level values. Thus, it is implemented in the macosx UI, and we
need to ignore some core events for proper functioning.
close #14151
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b8c639dd6c19dd8ecdf0804836c3dd0cf58bb217
---
modules/gui/macosx/VLCVoutWindowController.m | 2 +-
modules/gui/macosx/intf.m | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/modules/gui/macosx/VLCVoutWindowController.m b/modules/gui/macosx/VLCVoutWindowController.m
index 9cf3a15..53ed3fe 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -216,7 +216,7 @@
BOOL b_have_splitter = psz_splitter != NULL && *psz_splitter != '\0';
free(psz_splitter);
- if (!b_have_splitter && (var_InheritBool(VLCIntf, "fullscreen") || var_GetBool(pl_Get(VLCIntf), "fullscreen"))) {
+ if (!b_video_wallpaper && !b_have_splitter && (var_InheritBool(VLCIntf, "fullscreen") || var_GetBool(pl_Get(VLCIntf), "fullscreen"))) {
// this is not set when we start in fullscreen because of
// fullscreen settings in video prefs the second time
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 851f229..8682361 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -185,6 +185,12 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
{
unsigned i_state = va_arg(args, unsigned);
+ if (i_state & VOUT_WINDOW_STATE_BELOW)
+ {
+ msg_Dbg(p_wnd, "Ignore change to VOUT_WINDOW_STATE_BELOW");
+ goto out;
+ }
+
NSInteger i_cooca_level = NSNormalWindowLevel;
if (i_state & VOUT_WINDOW_STATE_ABOVE)
i_cooca_level = NSStatusWindowLevel;
@@ -202,7 +208,6 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
}
case VOUT_WINDOW_SET_SIZE:
{
-
unsigned int i_width = va_arg(args, unsigned int);
unsigned int i_height = va_arg(args, unsigned int);
@@ -220,6 +225,11 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
}
case VOUT_WINDOW_SET_FULLSCREEN:
{
+ if (var_InheritBool(VLCIntf, "video-wallpaper")) {
+ msg_Dbg(p_wnd, "Ignore fullscreen event as video-wallpaper is on");
+ goto out;
+ }
+
int i_full = va_arg(args, int);
BOOL b_animation = YES;
@@ -244,6 +254,7 @@ static int WindowControl(vout_window_t *p_wnd, int i_query, va_list args)
}
}
+out:
[o_vout_provider_lock unlock];
[o_pool release];
return VLC_SUCCESS;
More information about the vlc-commits
mailing list