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

Bug 354597

Summary: Resizing a browser window with a maximize Shell does not resize the Shell
Product: [RT] RAP Reporter: Jordi Boehme Lopez <jboehme>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: chris, tbuschto
Version: 1.5   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Jordi Boehme Lopez CLA 2011-08-12 05:25:46 EDT
Steps to reproduce:
- start the example below in a medium sized window.
- now click the maximize button of the browser.
-> you will see, the shell does not resize with the shell.


Example Code:

public class EmptySnippet implements IEntryPoint {
	public int createUI() {
		Display display = new Display();
		Shell shell = new Shell( display, SWT.NO_TRIM );
		shell.setText( "Snippet" );
		shell.setMaximized(true);
		shell.setBackground(display.getSystemColor(SWT.COLOR_DARK_RED));
		shell.open();
		while( !shell.isDisposed() ) {
			if( !display.readAndDispatch() ) {
				display.sleep();
			}
		}
		return 0;
	}
}
Comment 1 Ivan Furnadjiev CLA 2011-08-12 06:29:58 EDT
This happens only if you create the Shell maximized. Works fine if you maximize the shell with "max" button on the title bar.
Comment 2 Chris Fairhall CLA 2011-08-13 04:31:20 EDT
The RAP Mail demo is also effected. This doesn't have any setMaximize(true) in it at all. Happens with both business and fancy presentationFactories. Tested in both IE8 and Chrome 13.

The window contents resize with the browser but the containing shell does not.
The 2011-07-20 nightly build didn't have this issue.
Comment 3 Ivan Furnadjiev CLA 2011-08-13 04:41:17 EDT
Probably related to Shell protocol migration.
Comment 4 Tim Buschtoens CLA 2011-08-13 14:46:23 EDT
I think this is because "bounds" is applied after "mode". What i dont get is that this is the same order as before, and ShellLCA explicitly states that its the right order, so why did it work before? I must be missing something.
Comment 5 Tim Buschtoens CLA 2011-08-15 07:58:40 EDT
Fixed in CVS HEAD.

The generated "setSpace" of Widget.js was overwritten in Shell.js as part of fixing bug 306042. Since i dont use setSpace in the ShellAdapter.js/AdapterUtil.js, the fix did not work anymore. Fixed by changing the code of the bounds handler in ShellAdapter.