mirror of https://github.com/mpv-player/mpv
cocoa: refactor init window positioning code
This commit is contained in:
parent
0f8558a723
commit
27e4360b0b
|
@ -263,7 +263,7 @@ static void create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
|||
struct vo_cocoa_state *s = vo->cocoa;
|
||||
struct mp_vo_opts *opts = vo->opts;
|
||||
|
||||
const NSRect contentRect = NSMakeRect(0, 0, d_width, d_height);
|
||||
const NSRect contentRect = NSMakeRect(vo->dx, vo->dy, d_width, d_height);
|
||||
|
||||
int window_mask = 0;
|
||||
if (opts->border) {
|
||||
|
@ -300,7 +300,6 @@ static void create_window(struct vo *vo, uint32_t d_width, uint32_t d_height,
|
|||
[s->window setDelegate:s->window];
|
||||
[s->window makeMainWindow];
|
||||
|
||||
[s->window setFrameOrigin:NSMakePoint(vo->dx, vo->dy)];
|
||||
[s->window makeKeyAndOrderFront:nil];
|
||||
[NSApp activateIgnoringOtherApps:YES];
|
||||
|
||||
|
|
Loading…
Reference in New Issue