ivi-shell: emit created notification earlier for desktop surfaces
Without this, the earliest signal the ivi controller receives for a new surface is configure_desktop_changed signal. And this is not emitted until the surface has the first buffer attached. By emitting the signal during surface creation, the controller is able to set the initial width and height for the first configure. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
This commit is contained in:
parent
cd7801aa95
commit
924e79f4f2
@ -44,7 +44,8 @@ ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
|
|||||||
int32_t width, int32_t height);
|
int32_t width, int32_t height);
|
||||||
|
|
||||||
struct ivi_layout_surface*
|
struct ivi_layout_surface*
|
||||||
ivi_layout_desktop_surface_create(struct weston_surface *wl_surface);
|
ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
|
||||||
|
struct weston_desktop_surface *surface);
|
||||||
|
|
||||||
void
|
void
|
||||||
ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
|
ivi_layout_surface_configure(struct ivi_layout_surface *ivisurf,
|
||||||
|
@ -1882,7 +1882,6 @@ ivi_layout_surface_set_id(struct ivi_layout_surface *ivisurf,
|
|||||||
|
|
||||||
ivisurf->id_surface = id_surface;
|
ivisurf->id_surface = id_surface;
|
||||||
|
|
||||||
wl_signal_emit(&layout->surface_notification.created, ivisurf);
|
|
||||||
wl_signal_emit(&layout->surface_notification.configure_changed,
|
wl_signal_emit(&layout->surface_notification.configure_changed,
|
||||||
ivisurf);
|
ivisurf);
|
||||||
|
|
||||||
@ -1979,9 +1978,20 @@ ivi_layout_desktop_surface_configure(struct ivi_layout_surface *ivisurf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct ivi_layout_surface*
|
struct ivi_layout_surface*
|
||||||
ivi_layout_desktop_surface_create(struct weston_surface *wl_surface)
|
ivi_layout_desktop_surface_create(struct weston_surface *wl_surface,
|
||||||
|
struct weston_desktop_surface *surface)
|
||||||
{
|
{
|
||||||
return surface_create(wl_surface, IVI_INVALID_ID);
|
struct ivi_layout *layout = get_instance();
|
||||||
|
struct ivi_layout_surface *ivisurf;
|
||||||
|
|
||||||
|
ivisurf = surface_create(wl_surface, IVI_INVALID_ID);
|
||||||
|
|
||||||
|
if (ivisurf) {
|
||||||
|
ivisurf->weston_desktop_surface = surface;
|
||||||
|
wl_signal_emit(&layout->surface_notification.created, ivisurf);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ivisurf;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -489,13 +489,11 @@ desktop_surface_added(struct weston_desktop_surface *surface,
|
|||||||
struct weston_surface *weston_surf =
|
struct weston_surface *weston_surf =
|
||||||
weston_desktop_surface_get_surface(surface);
|
weston_desktop_surface_get_surface(surface);
|
||||||
|
|
||||||
layout_surface = ivi_layout_desktop_surface_create(weston_surf);
|
layout_surface = ivi_layout_desktop_surface_create(weston_surf, surface);
|
||||||
if (!layout_surface) {
|
if (!layout_surface) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
layout_surface->weston_desktop_surface = surface;
|
|
||||||
|
|
||||||
ivisurf = zalloc(sizeof *ivisurf);
|
ivisurf = zalloc(sizeof *ivisurf);
|
||||||
if (!ivisurf) {
|
if (!ivisurf) {
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user