Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 352858

Summary: Support full-screen windows in Lion
Product: [Eclipse Project] Platform Reporter: Alex Blewitt <alex.blewitt>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: eclipse.felipe
Version: 4.1   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
test patch none

Description Alex Blewitt CLA 2011-07-22 09:23:43 EDT
Build Identifier: 

Lion has support for full-screen applications. It would  be great if this could be added to SWT so that Eclipse could support it.

Reproducible: Always

Steps to Reproduce:
Run app on Lion
Note that the full-screen expand widget is not in place
Comment 1 Alex Blewitt CLA 2011-07-22 09:43:42 EDT
I believe this is the important document:

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html


This constant indicates that a window is in fullscreen mode.

enum {
   NSFullScreenWindowMask = 1 << 14
};


There's also some options on the NSApplication which can inform whether it's in fullscreen mode (or not). There's a blog here:

http://oleb.net/blog/2011/07/whats-new-for-developers-in-lion-part-1/
Comment 2 Alex Blewitt CLA 2011-07-22 09:48:28 EDT
This command will give full screen access on the primary monitor:

    [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];

It can run on non-primary monitors with:

    [window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
Comment 3 Alex Blewitt CLA 2011-07-22 09:58:20 EDT
Note that all the pieces are already in the SWT implementation to support this:


		Shell shell = window.getShell();
		NSWindow nswindow = shell.view.window();
		nswindow.setCollectionBehavior(1<<7);
Comment 4 Felipe Heidrich CLA 2011-07-22 20:44:22 EDT

*** This bug has been marked as a duplicate of bug 349148 ***
Comment 5 Felipe Heidrich CLA 2011-07-25 14:50:30 EDT
Created attachment 200299 [details]
test patch

I still don't have Lion :(
could you please try this patch and let me know if it works for you ? Thank.