| Summary: | [Shell] setMaximized does not work in some case | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | laurent russo <laurent.russo> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 2.3 | ||||||
| Target Milestone: | 3.0 M1 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Are you sure that you are using RAP 2.3? I've tried to modify our Workbech Demo as you mentioned in the description, but it's working fine for me. Could you provide a complete test project (modified Workbench Demo -> DemoWorkbenchWindowAdvisor) to demonstrate the issue? Does it happen in all browsers - IE10/11, Chrome, Firefox, Opera? Yes, i confirm you that we are using RAP 2.3. You will find a complete test project (modified Workbench Demo -> DemoWorkbenchWindowAdvisor) provided as attachment of the previous message. We can reproduce on (linux) firefox 30 & chromium 34 (pc) iexplorer 7 I can't reproduce it all the time (it's timing issue), but at least I saw the problem several times. Client does not send shell bounds, when the problem occurs (display bounds are correctly sent). We add client-side "windowresize" listener to the Shell, when mode ( "maximized" ) is applied. When restarting the application (F5), the shell mode is set by the server in the response of the first post request. If this request takes longer (your thread sleep code) and you resize the browser window when the request is running, "windowresize" listener is not attached yet and thus window resizing is not detected by the shell (old display/shell bounds are used). Fixed in master with change https://git.eclipse.org/r/31023. |
Created attachment 245635 [details] Rap Demo Project helping reproduction of Shell Maximization Issue We have a recurring problem on maximizing the shell during a long processing in postWindowOpen(). This issue occurs during workbench's creation when the user decide to manipulate browser's window size. 3 important points are to be considered : a simple App -> shellStyle(SWT.NO_TRIM) a long process -> Thread.sleep(3000) a maximized Shell -> shell.setMaximized(true); We can reproduce this behavior in RAP demo by modifying a few lines in the DemoWorkbenchWindowAdvisor (see snippet/project in attachment in order to reproduce the bug): To explain|summarize... in preWindowOpen() we define: getWindowConfigurer () setShellStyle (SWT.NO_TRIM).; in postWindowOpen() we add a pause to simulate a long process: try { Thread.sleep (3000); } Catch (InterruptedException e) { e.printStackTrace (); } and to maximize of the view,we overload the postWindowCreate() method: IWorkbench PlatformUI.getWorkbench workbench = (); IWorkbenchWindow workbench.getActiveWorkbenchWindow window = (); Shell shell = window.getShell (); shell.setMaximized (true); super.postWindowCreate (); To reproduce this issue we have to proceed the following three steps quickly chained: 1) Reduce the size of the window to a quarter of the screen size. 2) Press the 'F5' key and ... 3) immediately change the size of the browser window. When the Demo Application finally appears, it occupies the same size that the browser's window have before the processing (sleep (3000)).