[vlc-commits] macosx: fix video-wallpaper mode by ignoring core events

David Fuhrmann git at videolan.org
Sat Mar 21 21:02:50 CET 2015


vlc/vlc-2.2 | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sat Mar 14 15:59:26 2015 +0100| [e6d5e1fb76afc52e7e0f72b361143d5a9d45f9ad] | 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

(cherry picked from commit b8c639dd6c19dd8ecdf0804836c3dd0cf58bb217)
Signed-off-by: David Fuhrmann <dfuhrmann at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=e6d5e1fb76afc52e7e0f72b361143d5a9d45f9ad
---

 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 99b2192..2d17a99 100644
--- a/modules/gui/macosx/VLCVoutWindowController.m
+++ b/modules/gui/macosx/VLCVoutWindowController.m
@@ -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
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index 490c5b7..cbd2b43 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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;



More information about the vlc-commits mailing list