Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 489528 - Dialog bounds crosses screen dimension when a workspace saved at 100% zoom is opened at higher zoom 150%/200% using the same monitor.
Summary: Dialog bounds crosses screen dimension when a workspace saved at 100% zoom is...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.6   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: 4.6 M6   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-14 06:19 EDT by Niraj Modi CLA
Modified: 2016-03-17 09:32 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niraj Modi CLA 2016-03-14 06:19:57 EDT
Steps to reproduce:
1. Use Eclipse Neon I-build: I20160313-2000 and onwards build which contains SWT HighDpi autoScale feature.(SWT bug 479614)
2. Launch this Eclipse on 100% zoom setting.
3. Open Find/Replace dialog and place it to the right size of the workspace.
4. Now close this workspace, the location and size of this dialog is saved in below file:
<Workspace>\.metadata\.plugin\org.eclipse.jtd.ui\dialog_setting.xml
5. Now using the same monitor, change the zoom setting to 150%/200%.
6. Use this Eclipse(as in step 1) and open the same workspace.
7. Try to open the Find/Replace dialog.. it wont' be visible, because the location/size have been auto-scaled.
[To get this dialog back you need to press "Alt + Space" then select maximize]

Expected behavior:- Eclipse dialogs bounds shouldn't go beyond the screen dimensions.

Possible solutions: Either cap the size of these dialog bounds(location/size) to not to go beyond the screen dimensions
or (if possible) we reset the workspace dialog states when device zoom change is noticed.
Comment 1 Markus Keller CLA 2016-03-16 16:00:52 EDT
The general problem of storing window locations that end up outside of the display area is independent of the HiDPI setting. You could produce a similar problem by switching from a huge monitor to a VGA. This general problem is already solved in org.eclipse.jface.window.Window#getConstrainedShellBounds(Rectangle).

The actual problem was that Display#getMonitors() returned Monitors whose coordinates were not scaled down. Fixed with http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=c53936dceeaaebf51a17a15fd42cf358c3c2feca
Comment 2 Markus Keller CLA 2016-03-17 09:32:23 EDT
Verified in I20160317-0200.