xwm: Preserve unmaximized window size at map time

This fixes a problem that can be seen with Firefox running under xwayland.
- Start it (or another client that remembers its size and maximized state),
- resize it
- maximize it
- exit it
- restart it
- unmaximize it

The size will be changed to a default size and not the previous unmaximized
size.

To fix this, save the unmaximized height and width like we do for the
fullscreen case.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2022-12-02 09:12:11 -06:00 committed by Daniel Stone
parent eeef6be8e2
commit e7251a759b
1 changed files with 2 additions and 0 deletions

View File

@ -3035,6 +3035,8 @@ xserver_map_shell_surface(struct weston_wm_window *window,
parent->surface);
}
} else if (weston_wm_window_is_maximized(window)) {
window->saved_width = window->width;
window->saved_height = window->height;
xwayland_interface->set_maximized(window->shsurf);
} else {
if (weston_wm_window_type_inactive(window)) {