Full screen glitch
Full screen glitch
- Subject: Full screen glitch
- From: Simon Stapleton <email@hidden>
- Date: Mon, 18 Nov 2002 19:26:19 +0100
Okeydokey, I've been playing with full screen windows. All is well,
except...
... I'm getting an exception raised at runtime, as follows:
2002-11-18 18:46:36.358 TestApp[1410] *** -[NSNextStepFrame
contentAlpha]: selector not recognized
This is getting raised during NSDrawWindowBackground(), in the
following code:
while (dirtyArea = [enumerator nextObject]) {
NSRect dirtyRect = [[dirtyArea objectForKey:@"NSRect"] rectValue];
NSDrawWindowBackground(dirtyRect);
[[dirtyArea objectForKey:@"NSImage"]
dissolveToPoint:dirtyRect.origin fraction:alpha];
}
[context flushGraphics];
... where dirtyArea is a dictionary corresponding to an area to redraw
(objects being an NSValue wrapping an NSRect, and a precomposed image
which gets composited into the view). context, of course, is the
current NSGraphicsContext.
If my window is non-fullscreen, all works well. Something's obviously
amiss with the full-screen window. The NSNextStepFrame reference in
the exception tends to imply this, as well. Looks to me as though the
frame is broken somehow.
FScriptAnywhere tells me that NSNextStepFrame is a direct NSView
subclass, whereas all the other frame classes I can find are subclasses
of NSFrameView (which, of course, responds to contentAlpha)
The window is created as follows, in my window controller:
- (void) setFullScreen: (BOOL) flag {
if (_fullScreen = flag) {
int windowLevel = CGShieldingWindowLevel();
NSRect screenRect = [[NSScreen mainScreen] frame];
NSWindow * newWindow = [[[NSWindow alloc] initWithContentRect:
screenRect styleMask: NSBorderlessWindowMask backing:
NSBackingStoreBuffered defer: NO screen: [NSScreen mainScreen]]
autorelease];
id window = [self window];
[newWindow setContentView: [window contentView]];
[newWindow setLevel:windowLevel];
[newWindow setDelegate:self];
[self setWindow:newWindow];
}
}
Now, I'm hoping that this can be rectified by doing something when I
construct the window. Any ideas?
Otherwise I suppose I could implement a category on NSNextStepFrame, no?
The more I think about this, the more it looks like a bug.
Simon
--
PGP Key Id : 0x50D0698D
--
Eagles may soar, but weasels don't get sucked into jet engines.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.