summaryrefslogtreecommitdiffstats
path: root/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch')
-rw-r--r--meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch274
1 files changed, 0 insertions, 274 deletions
diff --git a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch b/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch
deleted file mode 100644
index 17544d5..0000000
--- a/meta-ivi/recipes-graphics/wayland/weston-1.6.0/0012-clients-support-ivi-application.xml-for-clients-wind.patch
+++ /dev/null
@@ -1,274 +0,0 @@
-From df22893f76fe2a101c659e53f4594121176fa174 Mon Sep 17 00:00:00 2001
-From: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-Date: Wed, 15 Oct 2014 12:13:52 +0900
-Subject: [PATCH 12/15] clients: support ivi-application.xml for
- clients/window.c
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
-remove NULL entry in listener
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------
-clients: window, remove visibility listener.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------
-
-clients: window, don't reindent, but just do
-
-if (!display->xdg_shell) return;
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------
-clients: window, remove unnecesary roundtrip
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------
-clients: window.c,
-surface->toysurface->destroy(surface->toysurface);
-
- if (surface->window->display->ivi_application)
- {
- ivi_surface_destroy(surface->window->ivi_surface);
- ivi_application_destroy(surface->window->display->ivi_application);
-
-I don't think this is the right place to destroy ivi_application. This
-means that the ivi_application is destroyed when the first window is
-destroyed, which prevents opening any new windows.
-
-Maybe it would be best to replace this hunk with just:
-
-if (surface->window->ivi_surface)
-ivi_surface_destroy(surface->window->ivi_surface);
-
-Note, that your destruction order is also funny: the wl_surface gets
-destroyed before the ivi_surface. Maybe that should be the other way
-around?
-
-Finally, I think this is the wrong place to destroy ivi_surface
-altogether. ivi_surface is a shell surface, and it should be destroyed
-with the window, just like xdg_surface is. That is, in window_destroy(),
-in similar way as xdg_surface_destroy() is called.
-
-ivi_surface is similar to xdg_surface here, not wl_surface.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
------------------------------------------------------
-clients: window.c, This is in the wrong place. ivi_surface should be
-created with the window, not with the underlying wl_surface or buffers.
-
- if (!surface->toysurface) {
- uint32_t id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid();
- surface->window->ivi_surface =
- ivi_application_surface_create(display->ivi_application,
- id_ivisurf, surface->surface);
- if (surface->window->ivi_surface == NULL) {
- fprintf(stderr, "Failed to create ivi_client_surface\n");
- abort();
- } +
- ivi_surface_add_listener(surface->window->ivi_surface,
- &ivi_surface_listener, surface->window);
- }
- }
-
-This is in the wrong place. ivi_surface should be created with the
-window, not with the underlying wl_surface or buffers.
-
-This code should be in window_create(), the same place as
-xdg_shell_get_xdg_surface() is used. Make sure you cannot create both
-xdg_surface and ivi_surface, if both xdg_shell and ivi_shell are
-advertised by the compositor.
-
-When you create ivi_surface in window_create(), that automatically means
-that window_create_custom() will not create a ivi_surface. That should
-finally fix the virtual keyboard application, so that you do not need
-the strcmp(surface->window->title,"Virtual keyboard") hack.
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
----------------------------------------------------------
-clients: window.c, clean up code
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
----------------------------------------------------------
-clients: window.c, jsut call fail_on_null(window->ivi_surface)
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-
----------------------------------------------------------
-clients: window.c, off a bit to struct ivi_surface *ivi_surface
-
-Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
----
- clients/window.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++--------
- 1 file changed, 57 insertions(+), 10 deletions(-)
-
-diff --git a/clients/window.c b/clients/window.c
-index e44d65c..2f05351 100644
---- a/clients/window.c
-+++ b/clients/window.c
-@@ -72,6 +72,10 @@ typedef void *EGLContext;
-
- #include "window.h"
-
-+#include <sys/types.h>
-+#include "ivi-application-client-protocol.h"
-+#define IVI_SURFACE_ID 9000
-+
- struct shm_pool;
-
- struct global {
-@@ -133,6 +137,7 @@ struct display {
-
- int has_rgb565;
- int seat_version;
-+ struct ivi_application *ivi_application;
- };
-
- struct window_output {
-@@ -249,6 +254,8 @@ struct window {
- struct window *parent;
- struct wl_surface *last_parent_surface;
-
-+ struct ivi_surface *ivi_surface;
-+
- struct window_frame *frame;
-
- /* struct surface::link, contains also main_surface */
-@@ -1379,6 +1386,19 @@ window_get_display(struct window *window)
- }
-
- static void
-+handle_ivi_surface_configure(void *data, struct ivi_surface *ivi_surface,
-+ int32_t width, int32_t height)
-+{
-+ struct window *window = data;
-+
-+ window_schedule_resize(window, width, height);
-+}
-+
-+static const struct ivi_surface_listener ivi_surface_listener = {
-+ handle_ivi_surface_configure,
-+};
-+
-+static void
- surface_create_surface(struct surface *surface, uint32_t flags)
- {
- struct display *display = surface->window->display;
-@@ -1501,7 +1521,7 @@ window_destroy(struct window *window)
-
- wl_list_remove(&window->redraw_task.link);
-
-- wl_list_for_each(input, &display->input_list, link) {
-+ wl_list_for_each(input, &display->input_list, link) {
- if (input->touch_focus == window)
- input->touch_focus = NULL;
- if (input->pointer_focus == window)
-@@ -1526,6 +1546,9 @@ window_destroy(struct window *window)
- if (window->xdg_popup)
- xdg_popup_destroy(window->xdg_popup);
-
-+ if (window->ivi_surface)
-+ ivi_surface_destroy(window->ivi_surface);
-+
- surface_destroy(window->main_surface);
-
- wl_list_remove(&window->link);
-@@ -3051,7 +3074,7 @@ touch_handle_down(void *data, struct wl_touch *wl_touch,
- wl_list_insert(&input->touch_point_list, &tp->link);
-
- if (widget->touch_down_handler)
-- (*widget->touch_down_handler)(widget, input,
-+ (*widget->touch_down_handler)(widget, input,
- serial, time, id,
- sx, sy,
- widget->user_data);
-@@ -4489,7 +4512,7 @@ window_create_internal(struct display *display, int custom)
- surface = surface_create(window);
- window->main_surface = surface;
-
-- assert(custom || display->xdg_shell);
-+ assert(custom || display->xdg_shell || display->ivi_application);
-
- window->custom = custom;
- window->preferred_format = WINDOW_PREFERRED_FORMAT_NONE;
-@@ -4509,17 +4532,30 @@ struct window *
- window_create(struct display *display)
- {
- struct window *window;
-+ uint32_t id_ivisurf;
-
- window = window_create_internal(display, 0);
-
-- window->xdg_surface =
-- xdg_shell_get_xdg_surface(window->display->xdg_shell,
-- window->main_surface->surface);
-- fail_on_null(window->xdg_surface);
-+ if (window->display->xdg_shell) {
-+ window->xdg_surface =
-+ xdg_shell_get_xdg_surface(window->display->xdg_shell,
-+ window->main_surface->surface);
-+ fail_on_null(window->xdg_surface);
-
-- xdg_surface_set_user_data(window->xdg_surface, window);
-- xdg_surface_add_listener(window->xdg_surface,
-- &xdg_surface_listener, window);
-+ xdg_surface_set_user_data(window->xdg_surface, window);
-+ xdg_surface_add_listener(window->xdg_surface,
-+ &xdg_surface_listener, window);
-+ } else if (display->ivi_application) {
-+ /* auto generation of ivi_id based on process id + basement of id */
-+ id_ivisurf = IVI_SURFACE_ID + (uint32_t)getpid();
-+ window->ivi_surface =
-+ ivi_application_surface_create(display->ivi_application,
-+ id_ivisurf, window->main_surface->surface);
-+ fail_on_null(window->ivi_surface);
-+
-+ ivi_surface_add_listener(window->ivi_surface,
-+ &ivi_surface_listener, window);
-+ }
-
- return window;
- }
-@@ -4772,6 +4808,9 @@ window_show_menu(struct display *display,
-
- frame_interior(menu->frame, &ix, &iy, NULL, NULL);
-
-+ if (!display->xdg_shell)
-+ return;
-+
- window->xdg_popup = xdg_shell_get_xdg_popup(display->xdg_shell,
- window->main_surface->surface,
- parent->main_surface->surface,
-@@ -5231,6 +5270,11 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id,
- wl_registry_bind(registry, id,
- &wl_subcompositor_interface, 1);
- }
-+ else if (strcmp(interface, "ivi_application") == 0) {
-+ d->ivi_application =
-+ wl_registry_bind(registry, id,
-+ &ivi_application_interface, 1);
-+ }
-
- if (d->global_handler)
- d->global_handler(d, id, interface, version, d->user_data);
-@@ -5529,6 +5573,9 @@ display_destroy(struct display *display)
- if (display->xdg_shell)
- xdg_shell_destroy(display->xdg_shell);
-
-+ if (display->ivi_application)
-+ ivi_application_destroy(display->ivi_application);
-+
- if (display->shm)
- wl_shm_destroy(display->shm);
-
---
-1.7.9.5
-