--- src/shell.c | 29 +++++++++++++++++------------ 1 Datei geändert, 17 Zeilen hinzugefügt(+), 12 Zeilen entfernt(-)
diff --git a/src/shell.c b/src/shell.c index 9c8a8a9..670cfd6 100644 --- a/src/shell.c +++ b/src/shell.c @@ -2520,13 +2520,22 @@ unlock(struct wl_listener *listener, void *data) } static void +show_input_panel(struct desktop_shell *shell, struct weston_surface *surface) +{ + wl_list_insert(&shell->input_panel_layer.surface_list, + &surface->layer_link); + weston_surface_assign_output(surface); + weston_surface_damage(surface); + weston_slide_run(surface, surface->geometry.height, 0, NULL, NULL); +} + +static void show_input_panels(struct wl_listener *listener, void *data) { struct desktop_shell *shell = container_of(listener, struct desktop_shell, show_input_panel_listener); struct input_panel_surface *surface, *next; - struct weston_surface *ws; shell->showing_input_panels = true; @@ -2534,14 +2543,8 @@ show_input_panels(struct wl_listener *listener, void *data) &shell->input_panel_layer.link); wl_list_for_each_safe(surface, next, - &shell->input_panel.surfaces, link) { - ws = surface->surface; - wl_list_insert(&shell->input_panel_layer.surface_list, - &ws->layer_link); - weston_surface_assign_output(ws); - weston_surface_damage(ws); - weston_slide_run(ws, ws->geometry.height, 0, NULL, NULL); - } + &shell->input_panel.surfaces, link) + show_input_panel(shell, surface->surface); } static void @@ -2905,17 +2908,19 @@ static void input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy) { struct weston_mode *mode = surface->output->current; + struct desktop_shell *shell = surface->private; + GLfloat x = (mode->width - surface->buffer->width) / 2; GLfloat y = mode->height - surface->buffer->height; - /* Don't map the input panel here, wait for - * show_input_panels signal. */ - weston_surface_configure(surface, surface->output->x + x, surface->output->y + y, surface->buffer->width, surface->buffer->height); + + if (!surface->layer_link.next || wl_list_empty(&surface->layer_link)) + show_input_panel(shell, surface); } static void -- 1.7.11.4 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel