This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 410208 - Multiwindow Application Restore
Summary: Multiwindow Application Restore
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 4.4 M3   Edit
Assignee: Eric Moffatt CLA
QA Contact: Eric Moffatt CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-07 11:45 EDT by Eugen Neufeld CLA
Modified: 2015-05-29 05:23 EDT (History)
4 users (show)

See Also:


Attachments
The patch for getting the correct window. (655 bytes, patch)
2013-06-07 11:45 EDT, Eugen Neufeld CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eugen Neufeld CLA 2013-06-07 11:45:49 EDT
Created attachment 232113 [details]
The patch for getting the correct window.

Hello,
I have a plain e4 application which consists of multi windows.
So to be more explicit, I have a MWindow and inside its perspective I defined a second MWindow. 
When I maximize a part in the first window, then a part in the second window, and then press restore in the second again, I expect that only the parts in the second window are resized. 
I think, that the problem is, that instead of the getWindowFor() method the modelService.getTopLevelWindowFor() method is used in the unzoom method. 
I attach a patch, which fixes this behavior for me.

Cheers,
Eugen
Comment 1 Eric Moffatt CLA 2013-06-10 15:58:58 EDT
Eugen, good pickup (and much thanks for the patch!).

I'll fix this one early..;-).
Comment 2 Eric Moffatt CLA 2013-10-28 13:34:42 EDT
Committed

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=ea5635361450715c812b2948707f4083f2594161

This is a slightly updated version of Eugen's suggestion. His fix worked for the restore case in a DW but an unzoom in the *top level* window would also restore all the minimized stacks in any associated DW's (because the 'findElements' also searches the DW's). We now explicitly ensure that we only affect minimized stacks in the same window as the 'element' being unzoomed.
Comment 3 Eric Moffatt CLA 2013-10-29 13:06:34 EDT
It turns out that we were still missing a corner case; when you maximize a stack there's code that un-maximizes *any* maximized stack.

To repro this:

Detach a stack and then drag another stack into the DW (so there are two stacks in the DW).

In the main presentation maximize the shared area
Now maximize one of the views in the DW
Now restore the maximized shared area

At this point trying to restore the maximized stack in the DW doesn't work; its MAXIMIZE tag has been removed by the maximize of the shared area in the main presentation.

Fix is to also apply the 'getWindowFor(element) == win' test we just added to the 'unzoom' code into the 'restoreMaximizedElement' method.
Comment 4 Eric Moffatt CLA 2013-10-30 09:58:49 EDT
Committed

http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6248d321a17636eb5e6686a738c0be50e7ad1a69

To fix the remaining issue...
Comment 5 Eric Moffatt CLA 2013-10-31 10:45:37 EDT
Verified in 4.4.0.I20131030-2000.