[vlc-commits] macosx: improve logic to toggle effect windows

David Fuhrmann git at videolan.org
Wed Mar 26 21:06:57 CET 2014


vlc | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Wed Mar 26 21:04:26 2014 +0100| [5428d0e1f1a6b825d2cc126caa719bd9b13c37b6] | committer: David Fuhrmann

macosx: improve logic to toggle effect windows

The window is now ordered in front every time with a single click / shortcut
like in iTunes.

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

 modules/gui/macosx/AudioEffects.m |    2 +-
 modules/gui/macosx/VideoEffects.m |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/AudioEffects.m b/modules/gui/macosx/AudioEffects.m
index 2120f80..a93a7a3 100644
--- a/modules/gui/macosx/AudioEffects.m
+++ b/modules/gui/macosx/AudioEffects.m
@@ -223,7 +223,7 @@ static VLCAudioEffects *_o_sharedInstance = nil;
 
 - (IBAction)toggleWindow:(id)sender
 {
-    if ([o_window isVisible])
+    if ([o_window isKeyWindow])
         [o_window orderOut:sender];
     else {
         [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]];
diff --git a/modules/gui/macosx/VideoEffects.m b/modules/gui/macosx/VideoEffects.m
index b435888..18bc543 100644
--- a/modules/gui/macosx/VideoEffects.m
+++ b/modules/gui/macosx/VideoEffects.m
@@ -771,7 +771,7 @@ static VLCVideoEffects *_o_sharedInstance = nil;
 
 - (IBAction)toggleWindow:(id)sender
 {
-    if ([o_window isVisible])
+    if ([o_window isKeyWindow])
         [o_window orderOut:sender];
     else {
         [o_window setLevel: [[[VLCMain sharedInstance] voutController] currentWindowLevel]];



More information about the vlc-commits mailing list