shell: Always set input-panel position on initial configure

If we're not currently showing the input panels, we still need to set the
panel position so that it's set when we later need to show them.  This fixes
the initial flicker of the input panel in the wrong position when we first
show it.
dev
Kristian Høgsberg 11 years ago
parent 7885890df8
commit c30c8a3db5
  1. 10
      desktop-shell/input-panel.c

@ -117,18 +117,10 @@ input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
struct input_panel_surface *ip_surface = surface->configure_private; struct input_panel_surface *ip_surface = surface->configure_private;
struct desktop_shell *shell = ip_surface->shell; struct desktop_shell *shell = ip_surface->shell;
float x, y; float x, y;
uint32_t show_surface = 0;
if (surface->width == 0) if (surface->width == 0)
return; return;
if (!weston_surface_is_mapped(surface)) {
if (!shell->showing_input_panels)
return;
show_surface = 1;
}
fprintf(stderr, "%s panel: %d, output: %p\n", __FUNCTION__, ip_surface->panel, ip_surface->output); fprintf(stderr, "%s panel: %d, output: %p\n", __FUNCTION__, ip_surface->panel, ip_surface->output);
if (ip_surface->panel) { if (ip_surface->panel) {
@ -141,7 +133,7 @@ input_panel_configure(struct weston_surface *surface, int32_t sx, int32_t sy)
weston_view_set_position(ip_surface->view, x, y); weston_view_set_position(ip_surface->view, x, y);
if (show_surface) { if (!weston_surface_is_mapped(surface) && shell->showing_input_panels) {
wl_list_insert(&shell->input_panel_layer.view_list, wl_list_insert(&shell->input_panel_layer.view_list,
&ip_surface->view->layer_link); &ip_surface->view->layer_link);
weston_view_update_transform(ip_surface->view); weston_view_update_transform(ip_surface->view);

Loading…
Cancel
Save