desktop-shell: Avoid retrieving output's width/height if none present
As in some circumstances there could be no output connected, avoid retrieving the width/height of the output if none was found/connected. Fixes: #384 Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
committed by
Daniel Stone
parent
c8feaae7d2
commit
6ebda36a3f
@@ -2697,8 +2697,10 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen,
|
|||||||
shell_surface_set_output(shsurf, output);
|
shell_surface_set_output(shsurf, output);
|
||||||
shsurf->fullscreen_output = shsurf->output;
|
shsurf->fullscreen_output = shsurf->output;
|
||||||
|
|
||||||
|
if (shsurf->output) {
|
||||||
width = shsurf->output->width;
|
width = shsurf->output->width;
|
||||||
height = shsurf->output->height;
|
height = shsurf->output->height;
|
||||||
|
}
|
||||||
} else if (weston_desktop_surface_get_maximized(desktop_surface)) {
|
} else if (weston_desktop_surface_get_maximized(desktop_surface)) {
|
||||||
get_maximized_size(shsurf, &width, &height);
|
get_maximized_size(shsurf, &width, &height);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user