Borderless window and focus
Borderless window and focus
- Subject: Borderless window and focus
- From: ss2 cire <email@hidden>
- Date: Tue, 21 Jul 2009 14:56:57 -0700
Hi all,
I have the following code to initialize a borderless window for
"fullscreen"
- (void)initFullScreenWindow
{
NSScreen *theScreen = [[NSScreen screens] objectAtIndex:0];
NSRect screenRect = NSMakeRect(0, 0, [theScreen frame].size.width,
[theScreen frame].size.height);
fullScreenWindow = [[NSWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES];
}
then i have this code to show/hide the menubar and do my "fullscreen"
window magic:
- (IBAction)showHideMenubar:(id)sender
{
if(fullScreenWindow == nil) {
[self initFullScreenWindow];
}
if([NSMenu menuBarVisible]) {
[NSMenu setMenuBarVisible:NO];
[RSCWindow orderOut:self];
[fullScreenWindow setContentView:rsWebView];
[fullScreenWindow makeKeyAndOrderFront:self];
} else {
[fullScreenWindow orderOut:self];
[RSCWindow setContentView:rsWebView];
[RSCWindow makeKeyAndOrderFront:self];
[rsWebView setFrame:rsWebViewNormalWindowFrame];
[NSMenu setMenuBarVisible:YES];
}
}
that all works fine and dandy, but when i move my view to it, the
scrollbars are "inactive"
and typing just causes beeps, is there anyway to allow my view to get
the focus?
the view is a webview if that info is needed.
Thanks in advance for any advice,
Regards,
Eric
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden