Commit 7ab519f6 authored by David Fuhrmann's avatar David Fuhrmann

macosx: don't allow a automatic resize beyond the right screen border

(cherry picked from commit 4b40a27d7c642132eb9f2de5209cca76ab85be79)
Signed-off-by: default avatarDavid Fuhrmann <david.fuhrmann@googlemail.com>
parent 03cb3277
......@@ -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];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment