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.
This commit is contained in:
parent
7885890df8
commit
c30c8a3db5
|
@ -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 desktop_shell *shell = ip_surface->shell;
|
||||
float x, y;
|
||||
uint32_t show_surface = 0;
|
||||
|
||||
if (surface->width == 0)
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
if (show_surface) {
|
||||
if (!weston_surface_is_mapped(surface) && shell->showing_input_panels) {
|
||||
wl_list_insert(&shell->input_panel_layer.view_list,
|
||||
&ip_surface->view->layer_link);
|
||||
weston_view_update_transform(ip_surface->view);
|
||||
|
|
Loading…
Reference in New Issue