• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Full screen glitch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: [OT] jobs?
  • Next by Date: Re: Table View Blues
  • Previous by thread: Re: MAC Address of machine
  • Next by thread: Database
  • Index(es):
    • Date
    • Thread