• 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
Fullscreen view not drawing properly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fullscreen view not drawing properly


  • Subject: Fullscreen view not drawing properly
  • From: Greg Hulands <email@hidden>
  • Date: Mon, 3 Feb 2003 08:52:49 +1000

Hi,
I have got an application to which I have it in run in full screen. The
code is as follows:

- (void)awakeFromNib
{
int windowLevel;
NSRect screenRect;
NSRect centerRect;
NSSize screenSize;
NSSize contentSize;
NSSize taScreenSize;

[self connect];
[self loadDocument];
taScreenSize = [NSApp screenSize];
[view setBoundsSize:taScreenSize];
[window setFrame:NSMakeRect(0,0, taScreenSize.width,
taScreenSize.height) display:YES];

if (CGDisplayCapture(kCGDirectMainDisplay) != kCGErrorSuccess)
{
NSLog(@"Could not capture screen");
}

windowLevel = CGShieldingWindowLevel();
screenRect = [[NSScreen mainScreen] frame];

mainWindow = [[NSWindow alloc] initWithContentRect:screenRect

styleMask:NSBorderlessWindowMask

backing:NSBackingStoreBuffered
defer:YES
screen:[NSScreen
mainScreen]];
[mainWindow setLevel:windowLevel];
[mainWindow setBackgroundColor:[NSColor blackColor]];
[mainWindow makeKeyAndOrderFront:nil];

screenSize = screenRect.size;
contentSize = [view bounds].size;

[mainWindow setContentView:[window contentView]];
}

The problem is that the view does not draw correctly. For example, the
view has a gradient background which draws correctly in another window,
but in the full screen window it is just white. I thought that it might
be the backing or defer in the window constructor. I changed them to
match the settings of the window that draws correctly, but to no avail.

Has anyone seen this problem before? Any solutions?

Regards,
Greg
_______________________________________________
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: Solved! and new question Re: NSTableView - probably a stupid question
  • Next by Date: Re: Piggybacking
  • Previous by thread: Re: Solved! and new question Re: NSTableView - probably a stupid question
  • Next by thread: NSTableView: how to get rid of corner view
  • Index(es):
    • Date
    • Thread