Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352858 - Support full-screen windows in Lion
Summary: Support full-screen windows in Lion
Status: CLOSED DUPLICATE of bug 349148
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.1   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-22 09:23 EDT by Alex Blewitt CLA
Modified: 2011-07-25 14:50 EDT (History)
1 user (show)

See Also:


Attachments
test patch (805 bytes, patch)
2011-07-25 14:50 EDT, Felipe Heidrich CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.