Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 166544 - [Wizards] WizardDialog fills the width of the screen on GTK
Summary: [Wizards] WizardDialog fills the width of the screen on GTK
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.3 M7   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 174545 180745 (view as bug list)
Depends on: 19462
Blocks:
  Show dependency tree
 
Reported: 2006-12-01 14:55 EST by Stefan Xenos CLA
Modified: 2008-12-23 08:07 EST (History)
3 users (show)

See Also:


Attachments
Patch includes the changes I showed to Karice (2.88 KB, patch)
2006-12-01 15:03 EST, Stefan Xenos CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Xenos CLA 2006-12-01 14:55:35 EST
On GTK, Eclipse 3.3 M3 (also reproducable in HEAD)

Right click in the package explorer, New > Other...
The dialog fills whe entire width of the screen.

This regression appears to have been caused by the patch to bug 19462, and it affects all WizardDialogs opened without first creating the Shell.

Here is a stack trace when the incorrect size was set:

	Shell(Control).setBounds(Rectangle) line: 521	
	WizardDialog.setShellSize(int, int) line: 1259	
	WizardDialog.update() line: 1183	
	WizardDialog.showStartingPage() line: 1125	
	WizardDialog.createContents(Composite) line: 516	
	WizardDialog(Window).create() line: 426	
	WizardDialog(Dialog).create() line: 1111	
	NewWizardAction.run() line: 176	
	NewWizardAction(Action).runWithEvent(Event) line: 499	
	ActionContributionItem.handleWidgetSelection(Event, boolean) line: 545	
	ActionContributionItem.access$2(ActionContributionItem, Event, boolean) line: 490	
	ActionContributionItem$5.handleEvent(Event) line: 402	
	EventTable.sendEvent(Event) line: 66	
	MenuItem(Widget).sendEvent(Event) line: 1095	
	Display.runDeferredEvents() line: 3226	
	Display.readAndDispatch() line: 2898	
	Workbench.runEventLoop(Window$IExceptionHandler, Display) line: 1945	
	Workbench.runUI() line: 1909	
	Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 425	
	PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149	
	IDEApplication.run(Object) line: 95	
	PlatformActivator$1.run(Object) line: 78	
	EclipseAppLauncher.runApplication(Object) line: 104	
	EclipseAppLauncher.start(Object) line: 74	
	EclipseStarter.run(Object) line: 348	
	EclipseStarter.run(String[], Runnable) line: 165	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25	
	Method.invoke(Object, Object[]) line: 324	
	Main.invokeFramework(String[], URL[]) line: 341	
	Main.basicRun(String[]) line: 285	
	Main.run(String[]) line: 987	
	Main.main(String[]) line: 962
Comment 1 Stefan Xenos CLA 2006-12-01 15:03:23 EST
Created attachment 54923 [details]
Patch includes the changes I showed to Karice

This patch demonstrates the use of GridData.exclude in order to adjust the preferred size of the shell rather than forcing an immediate resize.

I've confirmed that this fixes bug 166544, but I don't know if it causes a regression in bug 19462. This is mainly just to demonstrate the pattern.
Comment 2 Stefan Xenos CLA 2006-12-01 15:06:36 EST
Note that this might be hard to see on windows since Windows chooses different default shell sizes.

However, you should be able to confirm that the listener on line 486 of Window.java (the one that sets resizeHasOccurred = true) never gets called when opening a WizardDialog.
Comment 3 Karice McIntyre CLA 2006-12-01 15:07:01 EST
This one was my doing, so I will take it.
Comment 4 Karice McIntyre CLA 2006-12-19 15:23:58 EST
Stefan, I tried this using M4 on Linuk/GTK (fresh workspace) and the dialog is not full screen width.  Does this happen in a fresh workspace, or after a particular wizard was finished?  Is it possible this only occurs with dual monitors (which I don't have)?  
Comment 5 Stefan Xenos CLA 2007-01-02 13:29:16 EST
Re: comment 4

This has to do with the window manager's default size of uninitialized shells. Since this is determined by the window manager, it may have to do with your choice of window manager, screen resolution, default font, and contents of Xorg.conf (yes: it is probably affected by multimonitor).

Because so much can affect the window manager's decision about window placement, it would be a lot easier for you to verify this by putting a breakpoint in Window.java as I suggested in comment 2 than by actually reproducing the huge window. (Reproducing it would require figuring out which window manager or X server property causes it to happen, which would take some trial and error and is probably unnecessary since I'm offering access to a machine that can reproduce it).

FYI, I'm using KWin as my window manager, and I can attach copies of my Xorg.conf and version numbers for the relevant packages if you really want to build your own system that can reproduce it.
Comment 6 Stefan Xenos CLA 2007-01-24 10:25:13 EST
If you can verify that the patch I attached doesn't cause a regression in bug 166544, you might consider using it.
Comment 7 Stefan Xenos CLA 2007-02-05 17:54:57 EST
I can confirm that this happens on ubuntu and redhat, both using KDE.
Comment 8 Stefan Xenos CLA 2007-02-06 12:44:54 EST
Tod: Karice suggested that you review the attached patch. Reassigning.
Comment 9 Tod Creasey CLA 2007-03-01 13:11:05 EST
This patch actually turns off the progress bar completely. We will need to revisit  it before it can be released.
Comment 10 Stefan Xenos CLA 2007-03-20 20:39:46 EDT
Would it be possible to just revert the change the originally caused this bug? This bug is much more severe than bug 166544, which was really an enhancement.
Comment 11 Stefan Xenos CLA 2007-03-20 20:41:00 EDT
Sorry - bug 19462 is the one that caused this problem.
Comment 12 Tod Creasey CLA 2007-03-21 15:10:14 EDT
The patch in Bug 19462 has the rollback updated
Comment 13 Tod Creasey CLA 2007-03-26 14:43:43 EDT
Fixed by the rollback of Bug 19462
Comment 14 Karice McIntyre CLA 2007-04-30 09:51:04 EDT
*** Bug 174545 has been marked as a duplicate of this bug. ***
Comment 15 Tod Creasey CLA 2007-04-30 16:33:01 EDT
 Verified in I20070430-0010
Comment 16 Tod Creasey CLA 2007-06-20 12:44:02 EDT
*** Bug 180745 has been marked as a duplicate of this bug. ***