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

Bug 318810

Summary: Shell size is impossible to be set under certain circumstances.
Product: [Eclipse Project] Platform Reporter: multihyp <multihyp>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: multihyp, remy.suen
Version: 3.6   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description multihyp CLA 2010-07-04 09:27:34 EDT
Build Identifier: swt-3.6RC4-cocoa-macosx-x86_64

shell.setMinimumSize(width, height); makes any other size adjustments coming after or before this statement irrelevant. I.e. Once shell.setMinimumSize(width, height) is used the setBounds(x, y, width, height); won't function as it should, no matter setBounds() coming before or after the setMinimumSize() call.

Reproducible: Always

Steps to Reproduce:
Code snippet:

public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new Shell(display);

//            having the following shell.setMinimumSize() in either of the following places, makes setBounds() calls irrelevant.
//                shell.setMinimumSize(width, height); // <- either here
		shell.setBounds(50, 50, 100, 100);
//                shell.setMinimumSize(width, height); // <- or even here

		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
}
Comment 1 multihyp CLA 2010-07-04 09:53:44 EDT
seems to have been an error in the application rather than a bug. still might be worth looking into it.