[vlc-commits] Revert "macosx vout: show complete window if we would resize beyond screen bounds"

Felix Paul Kühne git at videolan.org
Sun Mar 4 13:12:54 CET 2012


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sun Mar  4 13:12:13 2012 +0100| [f55247fc93d025cfa3f96dc78d5d20f411cb6c8f] | committer: Felix Paul Kühne

Revert "macosx vout: show complete window if we would resize beyond screen bounds"

This reverts commit 3effe29897d85b43901bd879cdcc1cec8f80fd05.

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

 modules/video_output/macosx.m |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
index e4962c6..5e7ddee 100644
--- a/modules/video_output/macosx.m
+++ b/modules/video_output/macosx.m
@@ -355,7 +355,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                 return VLC_SUCCESS; // this is okay, since the event will occur again when we have a window
             NSRect windowFrame = [o_window frame];
             NSRect glViewFrame = [sys->glView frame];
-            NSRect screenFrame = [[o_window screen] visibleFrame];
+            NSSize screenSize = [[o_window screen] visibleFrame].size;
             NSSize windowMinSize = [o_window minSize];
 
             topleftbase.x = 0;
@@ -372,11 +372,10 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                 i_height = windowMinSize.height;
 
             /* make sure the window doesn't exceed the screen size the window is on */
-            if (i_width > screenFrame.size.width)
-            {
-                topleftscreen.x = screenFrame.origin.x;
-                i_width = screenFrame.size.width;
-            }
+            if (i_width > screenSize.width)
+                i_width = screenSize.width;
+            if (i_height > screenSize.height)
+                i_height = screenSize.height;
 
             if( i_height != glViewFrame.size.height || i_width != glViewFrame.size.width )
             {
@@ -386,12 +385,6 @@ static int Control (vout_display_t *vd, int query, va_list ap)
                 new_frame.origin.x = topleftscreen.x;
                 new_frame.origin.y = topleftscreen.y - new_frame.size.height;
 
-                if( new_frame.size.height > screenFrame.size.height )
-                {
-                    new_frame.size.height = screenFrame.size.height;
-                    new_frame.origin.y = screenFrame.origin.y;
-                }
-
                 [sys->glView performSelectorOnMainThread:@selector(setWindowFrameWithValue:) withObject:[NSValue valueWithRect:new_frame] waitUntilDone:NO];
             }
             [o_pool release];



More information about the vlc-commits mailing list