mac: mouse fixing, somewwhat. also just always send events for a bit
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoI_xD 2026-03-10 16:31:27 -07:00
commit d3c30bf6d3
3 changed files with 20 additions and 5 deletions

View file

@ -176,6 +176,21 @@ static NSPoint pointFlip(NSPoint point) {
this->lastEvent = [this->application currentEvent];
[this eventProcess:this->lastEvent];
if (this->_forceRender) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSEvent *event = [NSEvent otherEventWithType:NSApplicationDefined
location:NSMakePoint(0, 0)
modifierFlags:0
timestamp:0
windowNumber:0
context:nil
subtype:0
data1:0
data2:0];
[NSApp postEvent:event atStart:YES];
[pool release];
}
[[NSApplication sharedApplication] stop:nil];
}
@ -301,7 +316,7 @@ static NSPoint pointFlip(NSPoint point) {
- (void)getNextEvent {
[self sendClipboardEvent];
if (self->pointerLocked && [self->window isMainWindow]) {
if (self->pointerLocked && [self->window isMainWindow] && self->lastEvent) {
struct CGPoint pos;
pos.x = [window frame].origin.x + [window frame].size.width / 2;
pos.y = [window frame].origin.y + [window frame].size.height / 2;