shell: display the input panel on the active output

We now dynamically move the input panel (i.e. virtual
keyboard) surface to the output containing the currently
focused surface.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=71015

Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
dev
Manuel Bachmann 11 years ago committed by Kristian Høgsberg
parent 4ade0e4a29
commit 5082ad6b28
  1. 13
      desktop-shell/input-panel.c

@ -61,6 +61,19 @@ static void
show_input_panel_surface(struct input_panel_surface *ipsurf)
{
struct desktop_shell *shell = ipsurf->shell;
struct weston_seat *seat;
struct weston_surface *focus;
float x, y;
wl_list_for_each(seat, &shell->compositor->seat_list, link) {
if (!seat->keyboard)
continue;
focus = weston_surface_get_main_surface(seat->keyboard->focus);
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;
weston_view_set_position(ipsurf->view, x, y);
}
wl_list_insert(&shell->input_panel_layer.view_list,
&ipsurf->view->layer_link);

Loading…
Cancel
Save