Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 365923

Summary: Shell is no longer moved to fit Display bounds
Product: [RT] RAP Reporter: Ben Schulz <yaxay>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: ivan
Version: unspecifiedKeywords: needinfo
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ben Schulz CLA 2011-12-07 11:34:16 EST
Build Identifier: 1.4.1.20110914-1945

We switched from 1.3.1.20100915-2301 to 1.4.1.20110914-1945 and noticed a regression. Previously a Shell was moved (not resized) to fit the Display bounds and it no longer is.

The workaround is to move the Shell manually. The question, however, is whether this regression was intentional or not.

Reproducible: Always

Steps to Reproduce:
1. Create a Shell.
2. Set its bounds to not fit the Display (but small enough to be moved to fit).
3. Make the Shell visible.
Comment 1 Ivan Furnadjiev CLA 2011-12-09 03:21:10 EST
Ben, I don't quite understand what is the problem. Could you create a snippet that demonstrate the issue?
Comment 2 Ivan Furnadjiev CLA 2012-01-06 07:44:50 EST
Ben, we really need a snippet to understand what is the problem. Any progress on it?
Comment 3 Ben Schulz CLA 2012-02-14 02:50:28 EST
Ivan, I am really sorry that my answer is so late in coming. The following snippet exhibits the described behavior.

Shell s = new Shell(SWT.BORDER);
s.setLocation(500, 500);
s.setSize(200, 200);
s.open();

If the Browser is only 600 pixels in height then with rwt 1.3.1 the Shell would be moved up by 100 pixels in order to fit. In 1.4.1 it remains at location (500, 500).
Comment 4 Ivan Furnadjiev CLA 2012-02-14 03:13:19 EST
(In reply to comment #3)
> If the Browser is only 600 pixels in height then with rwt 1.3.1 the Shell would
> be moved up by 100 pixels in order to fit. In 1.4.1 it remains at location (500,
> 500).
Now I understand. I've checked with 1.3.2 and I can confirm you observation. But I'm not sure if this is a bug at all. The previous behavior wasn't added with a purpose (it was original qooxdoo framework behavior). From SWT point of view, when you open a Shell in a specific location, this location is not changed automatically.
Comment 5 Ralf Sternberg CLA 2012-02-15 04:16:19 EST
I agree with Ivan. When the Shell location is set explicitly, the framework should not change it. If you need this feature, you can query the display size at startup using Display#getBounds() and re-position the shell programmatically as needed. Would that work for you?
Comment 6 Ben Schulz CLA 2012-02-16 08:52:40 EST
I agree also. ;)

And yes, we can move it manually. I just needed to know whether this change was made intentionally/would stick. Feel free to close as INVALID/WONTFIX.

Thanks
Comment 7 Ivan Furnadjiev CLA 2012-02-16 09:02:15 EST
(In reply to comment #6)
> Feel free to close as INVALID/WONTFIX.