mac: revert back to what i had before with drawing, i still don't know how to fix this but it's better then nothing

This commit is contained in:
IoIxD 2026-04-13 21:19:09 -07:00
commit 522f32cfcd

View file

@ -657,10 +657,7 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
NSArray* subviews = [self subviews]; NSArray* subviews = [self subviews];
int i; int i;
if(self->width != dirtyRect.size.width || self->height != dirtyRect.size.height) { if(!self->rep) {
if(self->rep) {
[self->rep release];
}
if(dirtyRect.size.width && dirtyRect.size.height) { if(dirtyRect.size.width && dirtyRect.size.height) {
[self initRepAndContextWithWidth:dirtyRect.size.width [self initRepAndContextWithWidth:dirtyRect.size.width
Height:dirtyRect.size.height]; Height:dirtyRect.size.height];
@ -672,8 +669,13 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
} }
} }
[self->rep drawInRect:[self bounds]]; [self->rep drawInRect:NSMakeRect(dirtyRect.origin.x, dirtyRect.origin.y, [self->rep pixelsWide], [self->rep pixelsHigh])];
for(i = 0; i < [subviews count]; i++) {
MilskoCocoaView* subview = [subviews objectAtIndex:i];
NSRect bounds = [subview bounds];
[subview drawRect:bounds];
}
[pool release]; [pool release];
} }
@ -1003,9 +1005,9 @@ static void recursive_dispatch_key_released(MwLL handle, int* k) {
// This will close/terminate the application when the main window is closed. // This will close/terminate the application when the main window is closed.
- (void)windowWillClose:(NSNotification*)notification { - (void)windowWillClose:(NSNotification*)notification {
(void)notification; (void)notification;
MilskoCocoa* window = notification.object; // MilskoCocoa* window = notification.object;
MwLL handle = [window getHandle].pointer; // MwLL handle = [window getHandle].pointer;
MwLLDispatch(handle, close, NULL); // MwLLDispatch(handle, close, NULL);
} }
- (MilskoCocoaWindowDelegate*)initWithWin:(NSWindow*)win { - (MilskoCocoaWindowDelegate*)initWithWin:(NSWindow*)win {
@ -1236,7 +1238,9 @@ static void MwLLEndStateChangeImpl(MwLL handle) {
} }
static int MwLLCocoaCallInitImpl(void) { static int MwLLCocoaCallInitImpl(void) {
#ifndef __APPLE__
printf("Using GNUStep Backend\n"); printf("Using GNUStep Backend\n");
#endif
[MilskoCocoaApplication sharedApplication]; [MilskoCocoaApplication sharedApplication];