简体   繁体   中英

SWT: Minimizing child shells on Mac OS

I'm having problems with the way SWT child shells behave on different operating systems. On Windows, when I click on the minimize button of a child shell, only that shell will be minimized, ie resized/docked in the bottom left corner of the screen (which is the preferred behavior). In Linux, child shells minimize to the taskbar (which is not really a problem). However, in Mac OS X 10.5, minimizing a child shell will cause the parent window to minimize as well (which is a problem).

Child shells are created simply by passing the parent as the constructor argument, eg:

Shell editor = new Shell(Display.getCurrent().getActiveShell());

Any help would be much appreciated.

Assumed there is different window management behavior on different platforms which might not be SWT's fault - can you guarantee that getActiveShell always returns the common parent shell?

Another solution is simply to hide the child shells - should work the same on every platform, but might not fit in the context of your application.

Anyway, I see plenty options for replacing multiple child shells. Maybe the TabFolder or the ExpandBar could just be right for the job? Get an overview at the widgets page .

If these options are not possible, you could contact the SWT project. Maybe the developers can help you with the internal workings of the Mac OS implementation. A very radical (and from normal point of view unnecessary) step would be porting over to Swing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM