| Summary: | Shell.moveAbove() should not show widget if not visible | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Bogdan Gheorghe <gheorghe> | ||||
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | daniel_megert, eclipse.felipe, remy.suen, skovatch | ||||
| Version: | 3.6 | Flags: | eclipse.felipe:
review+
|
||||
| Target Milestone: | 3.7 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Mac OS X | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
So is the correct behavior that moveAbove() should implicitly make the window visible or that the call should be ignored because the window isn't visible? In Carbon moveAbove() (which eventually just calls BringToFront()) doesn't make the window visible. Need to check what win32 does. It should not make the window visible. We deed to see if it should change the stacking order when it is not visible. Looking for advice on StackOverflow.com for this one. It doesn't seem to be possible to make a window visible while respecting its Z order. You can only orderFront, orderBack or order relative to another window. There's no ShowWindow equivalent in Cocoa. I was going to ignore moveAbove() when the window isn't visible but then the window always shows up in front next time it's made visible, so that doesn't really help. Created attachment 194363 [details]
fix
The window must not be shown because of a call to moveAbove()/moveBelow().
Fixed > 20110502 |
Shell.moveAbove() doesn't show child area, just the frame. See snippet below: ===== import org.eclipse.swt.SWT; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class Test { public static void main(String[] args) { Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout(1, false)); Button b = new Button(shell, SWT.PUSH); b.setText("PUSH ME"); shell.setVisible(false); shell.moveAbove(null); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }