| Summary: | [GTK] Deiconifying fails when opening child shell before parent | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Alexandra Buzila <abuzila> |
| Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | arunkumar.thondapu, eneufeld, jhelming, maxb, pierre-charles.david, sravankumarl |
| Version: | 4.5 | ||
| Target Milestone: | 4.5 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| See Also: |
https://git.eclipse.org/r/45966 https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=83a43f4d1fc67b864696f081d908956580c27303 https://bugs.eclipse.org/bugs/show_bug.cgi?id=468040 |
||
| Whiteboard: | |||
There's already a bug report in Platform UI for the effects of this issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=227139 *** Bug 227139 has been marked as a duplicate of this bug. *** As a correction to what I said above, the problem occurs when minimizing the main shell, not the child. So, if the child shell opens before the main shell and you minimize the main shell, you cannot unminimize it.
We have a workaround for this: checking if the parent is visible before opening a child shell and opening it first when not.
public void open () {
checkWidget ();
bringToTop (false);
if (Shell.class.isInstance(getParent()) && !getParent().isVisible())
Shell.class.cast(getParent()).open();
setVisible (true);
if (isDisposed ()) return;
if (!restoreFocus () && !traverseGroup (true)) setFocus ();
}
If you think that this is an acceptable solution, we can provide a contribution.
Best wishes,
Alexandra
New Gerrit change created: https://git.eclipse.org/r/45966 I pushed the proposed solution to Gerrit. I reviewed this bug. I am not able to reproduce the original problem on Gnome and unity desktops. I am wondering whether this fix is really necessary Hi Sravan, We tested this on CentOS release 6.6 running Metacity 2.28.0 and gtk2-2.2423-6. The users from the other bug (Bug 227139) reported the same behavior for Linux Mint 17 MATE (among others) which probably also runs Metacity, so it's likely that this is a Metacity problem. I can retest this in Unity. Cheers, Alexandra Gerrit change https://git.eclipse.org/r/45966 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=83a43f4d1fc67b864696f081d908956580c27303 Merged to master Hi. While I can't be 100% sure, it looks like the change in commit http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=83a43f4d1fc67b864696f081d908956580c27303 caused regressions in at least one other project (EEF, see bug 468040) but making visible an existing but latent bug there. I checked with the Eclipse Modeling Mars M6 package (before the SWT change): the bug in EEF is not visible. With the Eclipse Modeling Mars M7 package (after the SWT change, with no change in EEF itself): the bug is now visible. While technically there is clearly a real bug in EEF, it has apparently been there for years and was invisible/harmless. We'll fix it in EEF itself (the fix seems trivial in this case), but maybe other projects will be bitten by this side effect and "become" broken just by upgrading to Mars. |
Small code example that reproduces the issue: Shell shell = new Shell(display); shell.setText("Main"); Shell childShell = new Shell(shell); childShell.setText("Child"); childShell.open(); shell.open(); If you minimize the child shell, you cannot unminimize the main shell anymore. If the main shell is opened before the child shell, the problem doesn't occur. This behavior was observed for gtk2.