forked from pyrite-dev/milsko
some 10.4 fixes
This commit is contained in:
parent
3f84b0f868
commit
4ca11145f1
1 changed files with 6 additions and 4 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue