Zoran Trifunovski
Zoran Trifunovski

Reputation: 321

Eclipse SWT how to disable "fullscreen" on Shell on MacOS 10.10 Yosemite

There are a lot of answered questions about how to disable resize (which I already did), but the new feature that Apple added, to expand the dialog (little green dot with arrows pointing up-right and down-left). This button is always enabled, despite various options that I tried, like

SWT.DIALOG_TRIM, 

SWT.CLOSE | SWT.TITLE

SWT.CLOSE

...

What is the correct style that I have to apply to the Shell constructor, in order to get the "expand" (or whatever this action is called) on MacOS 10.10 to be disabled?

Edit: this link helped me, I used the common code for Windows and Mac, and just as a note, the "Field" and the "Method" objects needs to be imported from java.lang.reflect package.

Upvotes: 1

Views: 221

Answers (1)

greg-449
greg-449

Reputation: 111142

For a pop-up dialog

SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL

(the default for a non-resizable Dialog) disables the green dot.

For the main application Shell I am not sure that you can control this with flags, although you may be able to use Mac specific code as mentioned in this question.

Upvotes: 1

Related Questions