[vlc-devel] commit: macosx: Make sure we don' t see a grey flash in float-on-top mode in embedded window. (Pierre d' Herbemont )

git version control git at videolan.org
Tue Jul 22 23:47:19 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Tue Jul 22 23:49:44 2008 +0200| [75c8bbcc13c31aef581bb2c6d9ffc6caf422bfa7]

macosx: Make sure we don't see a grey flash in float-on-top mode in embedded window.

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

 modules/gui/macosx/embeddedwindow.h |    1 +
 modules/gui/macosx/embeddedwindow.m |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/modules/gui/macosx/embeddedwindow.h b/modules/gui/macosx/embeddedwindow.h
index c31aa48..f451b51 100644
--- a/modules/gui/macosx/embeddedwindow.h
+++ b/modules/gui/macosx/embeddedwindow.h
@@ -53,6 +53,7 @@
     BOOL              b_window_is_invisible;
 
     NSSize videoRatio;
+    NSInteger originalLevel;
 }
 
 - (void)controlTintChanged;
diff --git a/modules/gui/macosx/embeddedwindow.m b/modules/gui/macosx/embeddedwindow.m
index 5fceaa9..a4d98e8 100644
--- a/modules/gui/macosx/embeddedwindow.m
+++ b/modules/gui/macosx/embeddedwindow.m
@@ -245,6 +245,10 @@
     if( blackout_other_displays )        
         [screen blackoutOtherScreens];
 
+    /* Make sure we don't see the window flashes in float-on-top mode */
+    originalLevel = [self level];
+    [self setLevel:NSNormalWindowLevel];
+
     /* Only create the o_fullscreen_window if we are not in the middle of the zooming animation */
     if (!o_fullscreen_window)
     {
@@ -506,6 +510,8 @@
 
     [o_fullscreen_window release];
     o_fullscreen_window = nil;
+    [self setLevel:originalLevel];
+
     [self unlockFullscreenAnimation];
 }
 




More information about the vlc-devel mailing list