495e50ca2eb80c78ee4144d580170c3419cf5af8
[AGL/meta-agl.git] / meta-agl / recipes-graphics / wayland / weston / 0014-simple-shm-remove-ivi-application-support.patch
1 index f9c8010b..c37cd00b 100644
2 --- a/Makefile.am
3 +++ b/Makefile.am
4 @@ -574,9 +574,7 @@ nodist_weston_simple_shm_SOURCES =          \
5         protocol/xdg-shell-unstable-v6-protocol.c               \
6         protocol/xdg-shell-unstable-v6-client-protocol.h        \
7         protocol/fullscreen-shell-unstable-v1-protocol.c        \
8 -       protocol/fullscreen-shell-unstable-v1-client-protocol.h \
9 -       protocol/ivi-application-protocol.c             \
10 -       protocol/ivi-application-client-protocol.h
11 +       protocol/fullscreen-shell-unstable-v1-client-protocol.h
12  weston_simple_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS)
13  weston_simple_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la
14  
15 diff --git a/clients/simple-shm.c b/clients/simple-shm.c
16 index 9fa2e214..fc2ef001 100644
17 --- a/clients/simple-shm.c
18 +++ b/clients/simple-shm.c
19 @@ -40,10 +40,6 @@
20  #include "xdg-shell-unstable-v6-client-protocol.h"
21  #include "fullscreen-shell-unstable-v1-client-protocol.h"
22  
23 -#include <sys/types.h>
24 -#include "ivi-application-client-protocol.h"
25 -#define IVI_SURFACE_ID 9000
26 -
27  struct display {
28         struct wl_display *display;
29         struct wl_registry *registry;
30 @@ -52,7 +48,6 @@ struct display {
31         struct zwp_fullscreen_shell_v1 *fshell;
32         struct wl_shm *shm;
33         bool has_xrgb;
34 -       struct ivi_application *ivi_application;
35  };
36  
37  struct buffer {
38 @@ -67,7 +62,6 @@ struct window {
39         struct wl_surface *surface;
40         struct zxdg_surface_v6 *xdg_surface;
41         struct zxdg_toplevel_v6 *xdg_toplevel;
42 -       struct ivi_surface *ivi_surface;
43         struct buffer buffers[2];
44         struct buffer *prev_buffer;
45         struct wl_callback *callback;
46 @@ -165,17 +159,6 @@ static const struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
47         handle_xdg_toplevel_close,
48  };
49  
50 -static void
51 -handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface,
52 -                            int32_t width, int32_t height)
53 -{
54 -       /* Simple-shm is resizable */
55 -}
56 -
57 -static const struct ivi_surface_listener ivi_surface_listener = {
58 -       handle_ivi_surface_configure,
59 -};
60 -
61  static struct window *
62  create_window(struct display *display, int width, int height)
63  {
64 @@ -213,19 +196,6 @@ create_window(struct display *display, int width, int height)
65                                                         window->surface,
66                                                         ZWP_FULLSCREEN_SHELL_V1_PRESENT_METHOD_DEFAULT,
67                                                         NULL);
68 -       } else if (display->ivi_application ) {
69 -               uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid();
70 -               window->ivi_surface =
71 -                       ivi_application_surface_create(display->ivi_application,
72 -                                                      id_ivisurf, window->surface);
73 -               if (window->ivi_surface == NULL) {
74 -                       fprintf(stderr, "Failed to create ivi_client_surface\n");
75 -                       abort();
76 -               }
77 -
78 -               ivi_surface_add_listener(window->ivi_surface,
79 -                                        &ivi_surface_listener, window);
80 -
81         } else {
82                 assert(0);
83         }
84 @@ -407,11 +377,6 @@ registry_handle_global(void *data, struct wl_registry *registry,
85                                           id, &wl_shm_interface, 1);
86                 wl_shm_add_listener(d->shm, &shm_listener, d);
87         }
88 -       else if (strcmp(interface, "ivi_application") == 0) {
89 -               d->ivi_application =
90 -                       wl_registry_bind(registry, id,
91 -                                        &ivi_application_interface, 1);
92 -       }
93  }
94  
95  static void
96 @@ -555,11 +520,6 @@ main(int argc, char **argv)
97  
98         fprintf(stderr, "simple-shm exiting\n");
99  
100 -       if (window->display->ivi_application) {
101 -               ivi_surface_destroy(window->ivi_surface);
102 -               ivi_application_destroy(window->display->ivi_application);
103 -       }
104 -
105         destroy_window(window);
106         destroy_display(display);
107