mirror of
https://github.com/mpv-player/mpv
synced 2025-04-07 18:14:33 +00:00
cocoa_common: honor the --geometry
option
This commit is contained in:
parent
05650110f3
commit
c78243c03e
@ -704,6 +704,10 @@
|
|||||||
|
|
||||||
*NOTE*: May not be supported by some of the older VO drivers.
|
*NOTE*: May not be supported by some of the older VO drivers.
|
||||||
|
|
||||||
|
*NOTE (OSX)*: On Mac OSX the origin of the screen coordinate system is
|
||||||
|
located on the the bottom-left corner. For instance, ``0:0`` will place the
|
||||||
|
window at the bottom-left of the screen.
|
||||||
|
|
||||||
*EXAMPLE*:
|
*EXAMPLE*:
|
||||||
|
|
||||||
``50:40``
|
``50:40``
|
||||||
|
@ -256,9 +256,15 @@ static void update_screen_info(struct vo *vo)
|
|||||||
void vo_cocoa_update_xinerama_info(struct vo *vo)
|
void vo_cocoa_update_xinerama_info(struct vo *vo)
|
||||||
{
|
{
|
||||||
struct vo_cocoa_state *s = vo->cocoa;
|
struct vo_cocoa_state *s = vo->cocoa;
|
||||||
|
struct MPOpts *opts = vo->opts;
|
||||||
|
|
||||||
update_screen_info(vo);
|
update_screen_info(vo);
|
||||||
aspect_save_screenres(vo, s->screen_frame.size.width,
|
aspect_save_screenres(vo, s->screen_frame.size.width,
|
||||||
s->screen_frame.size.height);
|
s->screen_frame.size.height);
|
||||||
|
opts->vo_screenwidth = s->screen_frame.size.width;
|
||||||
|
opts->vo_screenheight = s->screen_frame.size.height;
|
||||||
|
xinerama_x = s->screen_frame.origin.x;
|
||||||
|
xinerama_y = s->screen_frame.origin.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
int vo_cocoa_change_attributes(struct vo *vo)
|
int vo_cocoa_change_attributes(struct vo *vo)
|
||||||
@ -376,7 +382,7 @@ static int create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
|||||||
[s->window setDelegate:s->window];
|
[s->window setDelegate:s->window];
|
||||||
[s->window setContentSize:s->current_video_size];
|
[s->window setContentSize:s->current_video_size];
|
||||||
[s->window setContentAspectRatio:s->current_video_size];
|
[s->window setContentAspectRatio:s->current_video_size];
|
||||||
[s->window center];
|
[s->window setFrameOrigin:NSMakePoint(vo->dx, vo->dy)];
|
||||||
|
|
||||||
if (flags & VOFLAG_HIDDEN) {
|
if (flags & VOFLAG_HIDDEN) {
|
||||||
[s->window orderOut:nil];
|
[s->window orderOut:nil];
|
||||||
|
Loading…
Reference in New Issue
Block a user