input-panel: Fix show_input_panel_surface crash when no surface has focus

Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org>
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
dev
Nicolas Guyomard 9 years ago committed by Bryce Harrington
parent a151975347
commit 4845354cfa
  1. 2
      desktop-shell/input-panel.c

@ -74,6 +74,8 @@ show_input_panel_surface(struct input_panel_surface *ipsurf)
if (!keyboard || !keyboard->focus)
continue;
focus = weston_surface_get_main_surface(keyboard->focus);
if (!focus)
continue;
ipsurf->output = focus->output;
x = ipsurf->output->x + (ipsurf->output->width - ipsurf->surface->width) / 2;
y = ipsurf->output->y + ipsurf->output->height - ipsurf->surface->height;

Loading…
Cancel
Save