Merge "[RCAR] Update Rcar gen3 BSP to 3.6"
[AGL/meta-agl.git] / meta-agl-profile-graphical / recipes-graphics / wayland / weston / 0005-ivi-layout-introcuded-configure_desktop_changed.patch
1 index 5b1f12f0..dd0997aa 100644
2 --- a/ivi-shell/ivi-layout-export.h
3 +++ b/ivi-shell/ivi-layout-export.h
4 @@ -187,6 +187,16 @@ struct ivi_layout_interface {
5          */
6         int32_t (*add_listener_configure_surface)(struct wl_listener *listener);
7  
8 +       /**
9 +        * \brief add a listener for notification when desktop_surface is configured
10 +        *
11 +        * When an desktop_surface is configured, a signal is emitted
12 +        * to the listening controller plugins.
13 +        * The pointer of the configured desktop_surface is sent as the void *data argument
14 +        * to the wl_listener::notify callback function of the listener.
15 +        */
16 +       int32_t (*add_listener_configure_desktop_surface)(struct wl_listener *listener);
17 +
18         /**
19          * \brief Get all ivi_surfaces which are currently registered and managed
20          * by the services
21 diff --git a/ivi-shell/ivi-layout-private.h b/ivi-shell/ivi-layout-private.h
22 index 2b8bd472..fe5be01a 100644
23 --- a/ivi-shell/ivi-layout-private.h
24 +++ b/ivi-shell/ivi-layout-private.h
25 @@ -104,6 +104,7 @@ struct ivi_layout {
26                 struct wl_signal created;
27                 struct wl_signal removed;
28                 struct wl_signal configure_changed;
29 +               struct wl_signal configure_desktop_changed;
30         } surface_notification;
31  
32         struct weston_layer layout_layer;
33 diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
34 index fa8e75f6..690af742 100644
35 --- a/ivi-shell/ivi-layout.c
36 +++ b/ivi-shell/ivi-layout.c
37 @@ -1040,6 +1040,21 @@ ivi_layout_add_listener_configure_surface(struct wl_listener *listener)
38         return IVI_SUCCEEDED;
39  }
40  
41 +static int32_t
42 +ivi_layout_add_listener_configure_desktop_surface(struct wl_listener *listener)
43 +{
44 +       struct ivi_layout *layout = get_instance();
45 +
46 +       if (!listener) {
47 +               weston_log("ivi_layout_add_listener_configure_desktop_surface: invalid argument\n");
48 +               return IVI_FAILED;
49 +       }
50 +
51 +       wl_signal_add(&layout->surface_notification.configure_desktop_changed, listener);
52 +
53 +       return IVI_SUCCEEDED;
54 +}
55 +
56  uint32_t
57  ivi_layout_get_id_of_surface(struct ivi_layout_surface *ivisurf)
58  {
59 @@ -2057,6 +2072,7 @@ ivi_layout_init_with_compositor(struct weston_compositor *ec)
60         wl_signal_init(&layout->surface_notification.created);
61         wl_signal_init(&layout->surface_notification.removed);
62         wl_signal_init(&layout->surface_notification.configure_changed);
63 +       wl_signal_init(&layout->surface_notification.configure_desktop_changed);
64  
65         /* Add layout_layer at the last of weston_compositor.layer_list */
66         weston_layer_init(&layout->layout_layer, ec);
67 @@ -2081,6 +2097,7 @@ static struct ivi_layout_interface ivi_layout_interface = {
68         .add_listener_create_surface    = ivi_layout_add_listener_create_surface,
69         .add_listener_remove_surface    = ivi_layout_add_listener_remove_surface,
70         .add_listener_configure_surface = ivi_layout_add_listener_configure_surface,
71 +       .add_listener_configure_desktop_surface = ivi_layout_add_listener_configure_desktop_surface,
72         .get_surface                            = shell_get_ivi_layout_surface,
73         .get_surfaces                           = ivi_layout_get_surfaces,
74         .get_id_of_surface                      = ivi_layout_get_id_of_surface,