Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 318810 - Shell size is impossible to be set under certain circumstances.
Summary: Shell size is impossible to be set under certain circumstances.
Status: CLOSED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-04 09:27 EDT by multihyp CLA
Modified: 2010-07-04 13:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.