cocoa: refactor init window positioning code

This commit is contained in:
Stefano Pigozzi 2014-01-07 18:58:36 +01:00
parent 0f8558a723
commit 27e4360b0b
1 changed files with 1 additions and 2 deletions

View File

@ -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];