ivi-layout: use libweston-desktop api is to send configure events everywhere

Whenever shell_surface_send_configure() is called
weston_desktop_surface_set_size() should be used instead for desktop
surfaces. It is already done for IVI_LAYOUT_TRANSITION_VIEW_FADE_ONLY, do
it everywhere else too.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
Michael Olbrich 2019-06-26 08:00:43 +02:00 committed by Daniel Stone
parent 64a92265e8
commit 640109cf5e
3 changed files with 25 additions and 15 deletions

View File

@ -180,6 +180,9 @@ ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility);
void
ivi_layout_surface_set_size(struct ivi_layout_surface *ivisurf,
int32_t width, int32_t height);
struct ivi_layout_surface *
ivi_layout_get_surface_from_id(uint32_t id_surface);
int32_t

View File

@ -308,9 +308,9 @@ transition_move_resize_view_destroy(struct ivi_layout_transition *transition)
(struct move_resize_view_data *)transition->private_data;
struct ivi_layout_surface *layout_surface = data->surface;
shell_surface_send_configure(layout_surface->surface,
layout_surface->prop.dest_width,
layout_surface->prop.dest_height);
ivi_layout_surface_set_size(layout_surface,
layout_surface->prop.dest_width,
layout_surface->prop.dest_height);
if (transition->private_data) {
free(transition->private_data);

View File

@ -699,15 +699,9 @@ commit_surface_list(struct ivi_layout *layout)
ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
if (configured && !is_surface_transition(ivisurf)) {
if (weston_surface_is_desktop_surface(ivisurf->surface)) {
weston_desktop_surface_set_size(ivisurf->weston_desktop_surface,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
} else {
shell_surface_send_configure(ivisurf->surface,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
}
ivi_layout_surface_set_size(ivisurf,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
}
} else {
configured = 0;
@ -721,9 +715,9 @@ commit_surface_list(struct ivi_layout *layout)
ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
if (configured && !is_surface_transition(ivisurf)) {
shell_surface_send_configure(ivisurf->surface,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
ivi_layout_surface_set_size(ivisurf,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
}
}
}
@ -1556,6 +1550,19 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED;
}
void
ivi_layout_surface_set_size(struct ivi_layout_surface *ivisurf,
int32_t width, int32_t height)
{
if (weston_surface_is_desktop_surface(ivisurf->surface)) {
weston_desktop_surface_set_size(ivisurf->weston_desktop_surface,
width, height);
} else {
shell_surface_send_configure(ivisurf->surface,
width, height);
}
}
static int32_t
ivi_layout_screen_add_layer(struct weston_output *output,
struct ivi_layout_layer *addlayer)