Commit 640109cf authored by Michael Olbrich's avatar Michael Olbrich Committed by Daniel Stone

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's avatarMichael Olbrich <m.olbrich@pengutronix.de>
parent 64a92265
...@@ -180,6 +180,9 @@ ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf, ...@@ -180,6 +180,9 @@ ivi_layout_surface_set_opacity(struct ivi_layout_surface *ivisurf,
int32_t int32_t
ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf, ivi_layout_surface_set_visibility(struct ivi_layout_surface *ivisurf,
bool newVisibility); bool newVisibility);
void
ivi_layout_surface_set_size(struct ivi_layout_surface *ivisurf,
int32_t width, int32_t height);
struct ivi_layout_surface * struct ivi_layout_surface *
ivi_layout_get_surface_from_id(uint32_t id_surface); ivi_layout_get_surface_from_id(uint32_t id_surface);
int32_t int32_t
......
...@@ -308,7 +308,7 @@ transition_move_resize_view_destroy(struct ivi_layout_transition *transition) ...@@ -308,7 +308,7 @@ transition_move_resize_view_destroy(struct ivi_layout_transition *transition)
(struct move_resize_view_data *)transition->private_data; (struct move_resize_view_data *)transition->private_data;
struct ivi_layout_surface *layout_surface = data->surface; struct ivi_layout_surface *layout_surface = data->surface;
shell_surface_send_configure(layout_surface->surface, ivi_layout_surface_set_size(layout_surface,
layout_surface->prop.dest_width, layout_surface->prop.dest_width,
layout_surface->prop.dest_height); layout_surface->prop.dest_height);
......
...@@ -699,15 +699,9 @@ commit_surface_list(struct ivi_layout *layout) ...@@ -699,15 +699,9 @@ commit_surface_list(struct ivi_layout *layout)
ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
if (configured && !is_surface_transition(ivisurf)) { if (configured && !is_surface_transition(ivisurf)) {
if (weston_surface_is_desktop_surface(ivisurf->surface)) { ivi_layout_surface_set_size(ivisurf,
weston_desktop_surface_set_size(ivisurf->weston_desktop_surface,
ivisurf->prop.dest_width, ivisurf->prop.dest_width,
ivisurf->prop.dest_height); ivisurf->prop.dest_height);
} else {
shell_surface_send_configure(ivisurf->surface,
ivisurf->prop.dest_width,
ivisurf->prop.dest_height);
}
} }
} else { } else {
configured = 0; configured = 0;
...@@ -721,7 +715,7 @@ commit_surface_list(struct ivi_layout *layout) ...@@ -721,7 +715,7 @@ commit_surface_list(struct ivi_layout *layout)
ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE; ivisurf->pending.prop.transition_type = IVI_LAYOUT_TRANSITION_NONE;
if (configured && !is_surface_transition(ivisurf)) { if (configured && !is_surface_transition(ivisurf)) {
shell_surface_send_configure(ivisurf->surface, ivi_layout_surface_set_size(ivisurf,
ivisurf->prop.dest_width, ivisurf->prop.dest_width,
ivisurf->prop.dest_height); ivisurf->prop.dest_height);
} }
...@@ -1556,6 +1550,19 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf, ...@@ -1556,6 +1550,19 @@ ivi_layout_surface_set_destination_rectangle(struct ivi_layout_surface *ivisurf,
return IVI_SUCCEEDED; 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 static int32_t
ivi_layout_screen_add_layer(struct weston_output *output, ivi_layout_screen_add_layer(struct weston_output *output,
struct ivi_layout_layer *addlayer) struct ivi_layout_layer *addlayer)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment