Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331722 - BugzillaSearchPage restoreBounds should not set x/y coordinates
Summary: BugzillaSearchPage restoreBounds should not set x/y coordinates
Status: RESOLVED DUPLICATE of bug 265348
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Mylyn Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-02 16:24 EST by David Green CLA
Modified: 2010-12-06 05:58 EST (History)
1 user (show)

See Also:


Attachments
patch that causes the x/y coordinates to be ignored when restoring bounds (960 bytes, patch)
2010-12-02 16:25 EST, David Green CLA
no flags Details | Diff
mylyn/context/zip (1.92 KB, application/octet-stream)
2010-12-02 16:25 EST, David Green CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2010-12-02 16:24:37 EST
@BugzilaSearchPage.restoreBounds@ has code as follows:

bc.. 
IDialogSettings settings = getDialogSettings();
		IDialogSettings dialogBounds = settings.getSection(DIALOG_BOUNDS_KEY);
		Shell shell = getShell();
		if (shell != null) {
			Rectangle bounds = shell.getBounds();

			if (bounds != null && dialogBounds != null) {
				try {
					bounds.x = dialogBounds.getInt(X);
					bounds.y = dialogBounds.getInt(Y);
					bounds.height = dialogBounds.getInt(HEIGHT);
					bounds.width = dialogBounds.getInt(WIDTH);
					shell.setBounds(bounds);
				} catch (NumberFormatException e) {
					// silently ignored
				}
			}
		}

p. Setting the x/y coordinates can cause the search page to appear on the wrong monitor.  In my case, the x coordinate was negative, making the dialog appear on the 2nd monitor, however the new query dialog started on the first monitor.
Comment 1 David Green CLA 2010-12-02 16:25:32 EST
Created attachment 184411 [details]
patch that causes the x/y coordinates to be ignored when restoring bounds
Comment 2 David Green CLA 2010-12-02 16:25:33 EST
Created attachment 184412 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2010-12-06 05:58:00 EST
I believe that page should not set the dialog location in any case. Restoring of bounds should be handled by the dialog, otherwise a dialog can jump when a user switches pages. 

Although the patch fixes the symptoms of bug 265348 I would prefer a proper fix.

*** This bug has been marked as a duplicate of bug 265348 ***