xwm: fix a crash in handle_state

To produce the bug, build and run: (you don't need the game data to test)

https://github.com/clintbellanger/flare-engine/

$ mv ~/.config/flare ~/.config/flare.bak
$ ./flare  # click 'configure', set full screen mode then click 'ok'
           # weston will crash and dump core.

[Pekka: edited the commit message]
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
dev
Andrew Engelbrecht 10 years ago committed by Pekka Paalanen
parent cb50ed226b
commit 4c5a6f7a18
  1. 2
      xwayland/window-manager.c

@ -1326,7 +1326,9 @@ weston_wm_window_handle_state(struct weston_wm_window *window,
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
0, NULL); 0, NULL);
} else { } else {
if (window->shsurf)
shell_interface->set_toplevel(window->shsurf); shell_interface->set_toplevel(window->shsurf);
window->width = window->saved_width; window->width = window->saved_width;
window->height = window->saved_height; window->height = window->saved_height;
if (window->frame) if (window->frame)

Loading…
Cancel
Save