Community
Participate
Working Groups
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
Eugen, good pickup (and much thanks for the patch!). I'll fix this one early..;-).
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.
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.
Committed http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=6248d321a17636eb5e6686a738c0be50e7ad1a69 To fix the remaining issue...
Verified in 4.4.0.I20131030-2000.