diff options
author | Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> | 2014-04-10 16:36:57 +0300 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-04-10 10:20:54 -0700 |
commit | 641796c31ac5bebf42a630557de734aad01445c9 (patch) | |
tree | 5de3c89451dc654fe8150804db52eda6e95c91a2 /desktop-shell | |
parent | facc0ccf06850ec37972ed3002ae6783ef4cfbef (diff) |
shell: Keep shsurf->fullscreen_output set after unset_fullscreen()
When a fullscreen surface gets the maximized state, the function
reset_surface_type() is called and that causes unset_fullscreen() to be
called. That function would set the value of shsurf->fullscreen_output
to NULL. However, since the surface still has the fullscreen state, it
will be configured as a fullscreen surface again, and an attempt to
access that field would cause the compositor to crash.
Fix the crash by keeping the value of fullscreen_output around after
unset_fullscreen(). This is safe since the value is only used when a
surface has the fullscreen state and is replaced on a new request to
make the surface fullscreen.
https://bugs.freedesktop.org/show_bug.cgi?id=76867
Diffstat (limited to 'desktop-shell')
-rw-r--r-- | desktop-shell/shell.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 88ac3084..63b4d4cc 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2340,7 +2340,6 @@ unset_fullscreen(struct shell_surface *shsurf) shell_surface_is_top_fullscreen(shsurf)) { restore_output_mode(shsurf->fullscreen_output); } - shsurf->fullscreen_output = NULL; shsurf->fullscreen.type = WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT; shsurf->fullscreen.framerate = 0; |