Commit e6d5e1fb authored by David Fuhrmann's avatar 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

(cherry picked from commit b8c639dd6c19dd8ecdf0804836c3dd0cf58bb217)
Signed-off-by: default avatarDavid Fuhrmann <dfuhrmann@videolan.org>
parent 4d544c59
......@@ -215,7 +215,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
......
......@@ -181,6 +181,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;
......@@ -198,7 +204,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);
......@@ -216,6 +221,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;
......@@ -240,6 +250,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;
......
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