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>
dev
Michael Olbrich 5 years ago committed by Daniel Stone
parent 64a92265e8
commit 640109cf5e
  1. 3
      ivi-shell/ivi-layout-private.h
  2. 6
      ivi-shell/ivi-layout-transition.c
  3. 31
      ivi-shell/ivi-layout.c

@ -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,9 +308,9 @@ 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);
if (transition->private_data) { if (transition->private_data) {
free(transition->private_data); free(transition->private_data);

@ -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,9 +715,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)) {
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,
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)

Loading…
Cancel
Save