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

Bug 331722

Summary: BugzillaSearchPage restoreBounds should not set x/y coordinates
Product: z_Archived Reporter: David Green <greensopinion>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: robert.elves
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch that causes the x/y coordinates to be ignored when restoring bounds
none
mylyn/context/zip none

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 ***