• 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
Borderless window and focus
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Borderless window and focus
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: Expanding NSScrollView
  • Next by Date: Re: Borderless window and focus
  • Previous by thread: NSScrollView question answered
  • Next by thread: Re: Borderless window and focus
  • Index(es):
    • Date
    • Thread