Bug 516888 - Window width/height not updated after maximize/unmaximize
Summary: Window width/height not updated after maximize/unmaximize
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-18 09:54 EDT by Joachim Bleidiessel CLA
Modified: 2021-06-04 00:54 EDT (History)
4 users (show)

See Also:


Attachments
WindowResizeAddon (690 bytes, application/octet-stream)
2017-05-18 09:54 EDT, Joachim Bleidiessel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Bleidiessel CLA 2017-05-18 09:54:03 EDT
Created attachment 268440 [details]
WindowResizeAddon

I want to implement some custom behavior depending on the size of the main window/shell of my e4 rcp app. Therefore I started implementing an addon which subscribes to the corresponding topics (i.e. UIEvents.Window.TOPIC_WIDTH, see my attachement).

Problem:
When i start my app and resize the main window by resizing the borders with the cursor my addon correctly prints out the changes width/height.
But when i resize the main window with the maximize button to fullscreen (and back) no event gets fired. Furthermore i inspected the width/height of both, window and the corresponding shell. Whereas the shell instance reflects the correct dimensions (i.e. shell.getBounds().width), the window instance kept the old width/height (via window.getWidth()).

I assume the window instance should correctly reflect the width/height after maximizing it and also there should be some event fired.

I double checked this behavior with Windows 10 /Ubuntu 16.04 with latest eclipse build.
Comment 1 Lars Vogel CLA 2017-05-18 10:13:03 EDT
As discussed we should evaluate adding an event in line 575 in WBWRenderer.

	@Override
	public void hookControllerLogic(MUIElement me) {
		super.hookControllerLogic(me);

 @Joachim, please provide a Gerrit so that we can check this.
Comment 2 Thomas Schindl CLA 2017-05-18 14:57:37 EDT
[...]

> I assume the window instance should correctly reflect the width/height after
> maximizing it and also there should be some event fired.

well the code WBWRenderer explicitly handles the maximize case

I think the reason (note I have not written this code) is:

* Start Application
* Resize window to 800x600 (we update the model)
* Maximize the application (we ignore the size changes)
* Shutdown
* Start Application
* => window is resize to 800x600
* => window is maximized
* Demaximize => window is back at 800x600

So if you change that and reflect the value in the model you get a behaviour change. Please note I'm not saying that what is done there today is OK! I completely agree that model and widget have to be in sync!
Comment 3 Eclipse Genie CLA 2017-05-19 05:57:38 EDT
New Gerrit change created: https://git.eclipse.org/r/97545
Comment 4 Eclipse Genie CLA 2020-06-08 13:41:53 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Lars Vogel CLA 2020-09-14 04:53:11 EDT
Still relevant.
Comment 6 Lars Vogel CLA 2020-09-14 04:53:56 EDT
Rolf, something for you? Model and widgets are not in sync here.
Comment 7 Lars Vogel CLA 2020-11-18 08:31:50 EST
Mass change to 4.19 M1, please update the target if you have other plans.
Comment 8 Alexander Kurtakov CLA 2021-01-07 03:07:47 EST
Mass move 4.19 M1 bugs to M3
Comment 9 Niraj Modi CLA 2021-02-19 07:59:23 EST
Removing milestone from 4.19 M3 to 4.19, please re-target accordingly.
Comment 10 Kalyan Prasad Tatavarthi CLA 2021-03-02 02:09:44 EST
Mass move out of 4.19
Comment 11 Kalyan Prasad Tatavarthi CLA 2021-06-04 00:54:41 EDT
Mass Move out of 4.20