Bug 499360 - Detached window that is snapped forgets its size and location on minimize
Summary: Detached window that is snapped forgets its size and location on minimize
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2016-08-08 09:03 EDT by Nikolay Metchev CLA
Modified: 2020-02-19 20:00 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay Metchev CLA 2016-08-08 09:03:03 EDT
If you detach a an editor window from Eclipse and snap it to the edge of the screen using Windows+Right or Windows+Left, then minimize eclipse, the size and shape of the detached window will be forgotten when you restore again.

This is true in Windows 8 and Windows 10.
Comment 1 Patrik Suzzi CLA 2016-08-09 10:53:01 EDT
Reproduced in Eclipse Platform
Version: Oxygen (4.7)
Build id: I20160803-2000
OS: Windows 10, v.10.0, x86_64 / win32
Comment 2 Patrik Suzzi CLA 2016-08-09 11:03:26 EDT
Note: this does not happen in Linux (Ubuntu)
Comment 3 Patrik Suzzi CLA 2016-08-09 12:08:04 EDT
After a debug session, I verified that WBWRenderer#hookControllerLogic(MUIElement me) defines a ContolListener that handles the #controlResized() and #controlMoved() for the detached windows. 

I suggest looking into : 
- WBWRenderer#hookControllerLogic() 
- WBWRenderer#subscribeTopicWindowChanged()
Comment 4 Patrik Suzzi CLA 2016-08-10 09:31:28 EDT
After more debugging, I observed a detail, that could explain why the detached window forgets the size.

Looking at WBWRenderer#hookControllerLogic(), observe when the ControlListener is added, and add a log, to see when the #controlResized(.) or #controlMoved(.) are called. 

Practically, when you minimize by clicking the minimize button on the Main IDE window, the ControlListener, registered to track #controlResized(.) and #controlMoved(.), is called only for the main Ide Window, but not for the Detached one. 

Please, see it live in this 2 min. video: https://www.youtube.com/watch?v=W46tLxSx-aU

I think this could be an SWT issue, as the SWTEventListener#handleEvent (line 236) is not handling the case of SWT.Resize for the detached window. 

If anyone interested in debugging this, I suggest checking Shell(Widget)#sendEvent, to verify the event is not filtered out.
Comment 5 Nikolay Metchev CLA 2016-08-10 12:33:07 EDT
Just wanted to add that switching perspectives has the same problem as minimize.
Comment 6 Eclipse Genie CLA 2020-02-19 20:00:40 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.