|
@@ -307,6 +307,7 @@ @interface QemuCocoaView : NSView
|
|
BOOL isMouseGrabbed;
|
|
BOOL isMouseGrabbed;
|
|
BOOL isAbsoluteEnabled;
|
|
BOOL isAbsoluteEnabled;
|
|
CFMachPortRef eventsTap;
|
|
CFMachPortRef eventsTap;
|
|
|
|
+ CGColorSpaceRef colorspace;
|
|
}
|
|
}
|
|
- (void) switchSurface:(pixman_image_t *)image;
|
|
- (void) switchSurface:(pixman_image_t *)image;
|
|
- (void) grabMouse;
|
|
- (void) grabMouse;
|
|
@@ -359,6 +360,7 @@ - (id)initWithFrame:(NSRect)frameRect
|
|
[trackingArea release];
|
|
[trackingArea release];
|
|
screen.width = frameRect.size.width;
|
|
screen.width = frameRect.size.width;
|
|
screen.height = frameRect.size.height;
|
|
screen.height = frameRect.size.height;
|
|
|
|
+ colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
|
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_14_0
|
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_VERSION_14_0
|
|
[self setClipsToBounds:YES];
|
|
[self setClipsToBounds:YES];
|
|
#endif
|
|
#endif
|
|
@@ -379,6 +381,7 @@ - (void) dealloc
|
|
CFRelease(eventsTap);
|
|
CFRelease(eventsTap);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ CGColorSpaceRelease(colorspace);
|
|
[super dealloc];
|
|
[super dealloc];
|
|
}
|
|
}
|
|
|
|
|
|
@@ -456,7 +459,7 @@ - (void) drawRect:(NSRect) rect
|
|
DIV_ROUND_UP(bitsPerPixel, 8) * 2, //bitsPerComponent
|
|
DIV_ROUND_UP(bitsPerPixel, 8) * 2, //bitsPerComponent
|
|
bitsPerPixel, //bitsPerPixel
|
|
bitsPerPixel, //bitsPerPixel
|
|
stride, //bytesPerRow
|
|
stride, //bytesPerRow
|
|
- CGColorSpaceCreateWithName(kCGColorSpaceSRGB), //colorspace
|
|
|
|
|
|
+ colorspace, //colorspace
|
|
kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, //bitmapInfo
|
|
kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst, //bitmapInfo
|
|
dataProviderRef, //provider
|
|
dataProviderRef, //provider
|
|
NULL, //decode
|
|
NULL, //decode
|