[英]SWT: Minimizing child shells on Mac OS
I'm having problems with the way SWT child shells behave on different operating systems. SWT子外壳在不同操作系统上的行为方式出现问题。 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).
在Windows上,当我单击子外壳程序的“最小化”按钮时,仅该外壳程序将被最小化,即在屏幕的左下角调整大小/对接(这是首选行为)。 In Linux, child shells minimize to the taskbar (which is not really a problem).
在Linux中,子shell最小化到任务栏(这不是真正的问题)。 However, in Mac OS X 10.5, minimizing a child shell will cause the parent window to minimize as well (which is a problem).
但是,在Mac OS X 10.5中,最小化子外壳会导致父窗口也最小化(这是一个问题)。
Child shells are created simply by passing the parent as the constructor argument, eg: 通过将父级作为构造函数参数来简单地创建子级shell,例如:
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? 假设在不同平台上存在不同的窗口管理行为,这可能不是SWT的问题-您可以保证
getActiveShell
始终返回公共父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? TabFolder
或ExpandBar
可能恰好适合这项工作? Get an overview at the widgets page . 在窗口小部件页面上获得概述。
If these options are not possible, you could contact the SWT project. 如果无法使用这些选项,则可以联系 SWT项目。 Maybe the developers can help you with the internal workings of the Mac OS implementation.
也许开发人员可以帮助您进行Mac OS实施的内部工作。 A very radical (and from normal point of view unnecessary) step would be porting over to Swing.
一个非常激进的步骤(从正常的角度来看是不必要的)将移植到Swing。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.