This commit is contained in:
parent
943500a7ec
commit
b585ad69b7
2 changed files with 5 additions and 15 deletions
|
|
@ -80,7 +80,6 @@
|
||||||
MilskoCocoaView *view;
|
MilskoCocoaView *view;
|
||||||
MwLL parent;
|
MwLL parent;
|
||||||
MilskoFakePointer *handle;
|
MilskoFakePointer *handle;
|
||||||
MwBool doWHResize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (MilskoCocoa *)newWithParent:(MwLL)parent
|
+ (MilskoCocoa *)newWithParent:(MwLL)parent
|
||||||
|
|
|
||||||
|
|
@ -162,7 +162,7 @@
|
||||||
NSRect frame = [self->window frame];
|
NSRect frame = [self->window frame];
|
||||||
|
|
||||||
*x = frame.origin.x;
|
*x = frame.origin.x;
|
||||||
*y = frame.origin.y;
|
*y = frame.origin.y - frame.size.height;
|
||||||
|
|
||||||
*w = frame.size.width;
|
*w = frame.size.width;
|
||||||
*h = frame.size.height;
|
*h = frame.size.height;
|
||||||
|
|
@ -175,11 +175,9 @@
|
||||||
|
|
||||||
if (self->parent) {
|
if (self->parent) {
|
||||||
NSWindow *parentWindow = [self parentWindow];
|
NSWindow *parentWindow = [self parentWindow];
|
||||||
CGFloat ny;
|
NSRect correctedFrame =
|
||||||
NSRect realFrame = parentWindow.frame;
|
[parentWindow contentRectForFrameRect:parentWindow.frame];
|
||||||
NSRect correctedFrame = [parentWindow contentRectForFrameRect:realFrame];
|
frame.origin.y = (correctedFrame.size.height - y);
|
||||||
ny = (correctedFrame.size.height - y);
|
|
||||||
frame.origin.y = ny;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[self->window setFrame:frame display:YES animate:false];
|
[self->window setFrame:frame display:YES animate:false];
|
||||||
|
|
@ -423,10 +421,6 @@
|
||||||
[self->window dealloc];
|
[self->window dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setDoWHResize:(MwBool)d {
|
|
||||||
doWHResize = d;
|
|
||||||
};
|
|
||||||
|
|
||||||
- (NSWindow *)parentWindow {
|
- (NSWindow *)parentWindow {
|
||||||
NSWindow *topmostWindow = self->window;
|
NSWindow *topmostWindow = self->window;
|
||||||
while (topmostWindow.parentWindow)
|
while (topmostWindow.parentWindow)
|
||||||
|
|
@ -477,7 +471,6 @@
|
||||||
|
|
||||||
- (void)drawRect:(NSRect)dirtyRect {
|
- (void)drawRect:(NSRect)dirtyRect {
|
||||||
NSSize sz = [self->rep size];
|
NSSize sz = [self->rep size];
|
||||||
unsigned char *pixels;
|
|
||||||
[super drawRect:dirtyRect];
|
[super drawRect:dirtyRect];
|
||||||
if (!self->rep) {
|
if (!self->rep) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -485,7 +478,7 @@
|
||||||
|
|
||||||
[self->rep drawInRect:NSMakeRect(0, 0, width, height)];
|
[self->rep drawInRect:NSMakeRect(0, 0, width, height)];
|
||||||
|
|
||||||
pixels = [self->rep bitmapData];
|
[self->rep bitmapData];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)destroy {
|
- (void)destroy {
|
||||||
|
|
@ -507,8 +500,6 @@
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation MilskoFakePointer
|
@implementation MilskoFakePointer
|
||||||
- (void)viewDidMoveToSuperview {
|
|
||||||
}
|
|
||||||
- (void)setPointer:(void *)pointer {
|
- (void)setPointer:(void *)pointer {
|
||||||
self.frame = *(NSRect *)&pointer;
|
self.frame = *(NSRect *)&pointer;
|
||||||
self->ptr = pointer;
|
self->ptr = pointer;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue