some 10.4 fixes

This commit is contained in:
IoIxD 2026-03-09 16:35:09 -07:00
commit 4ca11145f1

View file

@ -138,7 +138,9 @@ static NSPoint pointFlip(NSPoint point) {
c->rect.origin.y -= [p->window frame].origin.y - offset; c->rect.origin.y -= [p->window frame].origin.y - offset;
c->rect.origin.y -= offset; c->rect.origin.y -= offset;
} else { } else {
[c->application setActivationPolicy:NSApplicationActivationPolicyRegular]; if ([c->application respondsToSelector:@selector(setActivationPolicy:)]) {
[c->application setActivationPolicy:0 /* NSApplicationActivationPolicyRegular */];
}
[c->application activateIgnoringOtherApps:true]; [c->application activateIgnoringOtherApps:true];
[c->window makeFirstResponder:c->view]; [c->window makeFirstResponder:c->view];
[c->window makeKeyAndOrderFront:nil]; [c->window makeKeyAndOrderFront:nil];
@ -305,9 +307,9 @@ static NSPoint pointFlip(NSPoint point) {
[self sendClipboardEvent]; [self sendClipboardEvent];
if (self->pointerLocked && [self->window isMainWindow]) { if (self->pointerLocked && [self->window isMainWindow]) {
NSPoint pos = [window frame].origin; struct CGPoint pos;
pos.x += [window frame].size.width / 2; pos.x = [window frame].origin.x + [window frame].size.width / 2;
pos.y += [window frame].size.height / 2; pos.y = [window frame].origin.y + [window frame].size.height / 2;
CGWarpMouseCursorPosition(pos); CGWarpMouseCursorPosition(pos);
} }