[vlc-commits] macosx: don't allow a automatic resize beyond the right screen border
David Fuhrmann
git at videolan.org
Sat Jul 7 21:37:08 CEST 2012
vlc/vlc-2.0 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Fri Jul 6 14:24:27 2012 +0200| [7ab519f69b394d2aa3e9e6eec7f385809b644b9f] | committer: David Fuhrmann
macosx: don't allow a automatic resize beyond the right screen border
(cherry picked from commit 4b40a27d7c642132eb9f2de5209cca76ab85be79)
Signed-off-by: David Fuhrmann <david.fuhrmann at googlemail.com>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=7ab519f69b394d2aa3e9e6eec7f385809b644b9f
---
modules/gui/macosx/MainWindow.m | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/gui/macosx/MainWindow.m b/modules/gui/macosx/MainWindow.m
index ee86c8a..d6d2363 100644
--- a/modules/gui/macosx/MainWindow.m
+++ b/modules/gui/macosx/MainWindow.m
@@ -1666,6 +1666,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
if( new_frame.origin.y < screenFrame.origin.y )
new_frame.origin.y = screenFrame.origin.y;
+ CGFloat right_screen_point = screenFrame.origin.x + screenFrame.size.width;
+ CGFloat right_window_point = new_frame.origin.x + new_frame.size.width;
+ if( right_window_point > right_screen_point )
+ new_frame.origin.x -= ( right_window_point - right_screen_point );
+
[[o_videoWindow animator] setFrame:new_frame display:YES];
}
More information about the vlc-commits
mailing list