From 59fb43fa95a212af20009247332b4c5c34302b1f Mon Sep 17 00:00:00 2001 From: Manuel Bachmann Date: Wed, 13 Jan 2016 18:36:55 +0000 Subject: Migrate IVI-Shell backport to Weston 1.8.0 (Yocto 2.0) (NOTICE : this is the last patch necessary to fully migrate to Yocto 2.0) As newer Poky "Jethro" is now providing Weston 1.8.0, adapt IVI-Shell 1.9.0 backport to it. Remove unnecessary patches (touchscreen support for Qt, panel toggle) which are now upstreamed. Make the systemd service recipe name more generic. Change-Id: Icaad3f40b29617bcb33ac235bbe3c65f7f4bdbd7 Signed-off-by: Manuel Bachmann --- ...es-made-in-libinput-src-evdev.c-for-touch.patch | 65 -------------- ...ll-add-option-to-avoid-creating-the-panel.patch | 99 ---------------------- .../recipes-graphics/wayland/weston_%.bbappend | 26 ++++++ .../recipes-graphics/wayland/weston_1.5.0.bbappend | 28 ------ 4 files changed, 26 insertions(+), 192 deletions(-) delete mode 100644 meta-agl/recipes-graphics/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch delete mode 100644 meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch create mode 100644 meta-agl/recipes-graphics/wayland/weston_%.bbappend delete mode 100644 meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend (limited to 'meta-agl/recipes-graphics') diff --git a/meta-agl/recipes-graphics/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch b/meta-agl/recipes-graphics/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch deleted file mode 100644 index 1bb9253d4..000000000 --- a/meta-agl/recipes-graphics/wayland/weston/0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch +++ /dev/null @@ -1,65 +0,0 @@ -From c4633014fff25d32926129a8b028124c6338bb2b Mon Sep 17 00:00:00 2001 -From: Louai Al-Khanji -Date: Wed, 19 Aug 2015 09:04:46 +0300 -Subject: [PATCH 1/1] Adapt changes made in libinput/src/evdev.c for touch - frame emission. - ---- - src/evdev.c | 27 +++++++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/src/evdev.c b/src/evdev.c -index 888dfbd..daa5d72 100644 ---- a/src/evdev.c -+++ b/src/evdev.c -@@ -359,12 +359,36 @@ evdev_process_absolute(struct evdev_device *device, - } - } - -+static inline int -+evdev_need_touch_frame(struct evdev_device *device) -+{ -+ if (!(device->seat_caps & EVDEV_SEAT_TOUCH)) -+ return 0; -+ -+ switch (device->pending_event) { -+ case EVDEV_NONE: -+ case EVDEV_RELATIVE_MOTION: -+ break; -+ case EVDEV_ABSOLUTE_MT_DOWN: -+ case EVDEV_ABSOLUTE_MT_MOTION: -+ case EVDEV_ABSOLUTE_MT_UP: -+ case EVDEV_ABSOLUTE_TOUCH_DOWN: -+ case EVDEV_ABSOLUTE_TOUCH_UP: -+ case EVDEV_ABSOLUTE_MOTION: -+ return 1; -+ } -+ -+ return 0; -+} -+ - static void - fallback_process(struct evdev_dispatch *dispatch, - struct evdev_device *device, - struct input_event *event, - uint32_t time) - { -+ int need_frame = 0; -+ - switch (event->type) { - case EV_REL: - evdev_process_relative(device, event, time); -@@ -376,7 +400,10 @@ fallback_process(struct evdev_dispatch *dispatch, - evdev_process_key(device, event, time); - break; - case EV_SYN: -+ need_frame = evdev_need_touch_frame(device); - evdev_flush_pending_event(device, time); -+ if (need_frame) -+ notify_touch_frame(device->seat); - break; - } - } --- -2.1.4 - diff --git a/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch b/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch deleted file mode 100644 index 5e8c3c9dc..000000000 --- a/meta-agl/recipes-graphics/wayland/weston/0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch +++ /dev/null @@ -1,99 +0,0 @@ -From e67118c80ad411ac46b7096aae2635510c80ea6d Mon Sep 17 00:00:00 2001 -From: Jonny Lamb -Date: Tue, 12 Aug 2014 15:07:51 +0200 -Subject: desktop-shell: add option to avoid creating the panel - -This option is so we can disable showing any panel at all. The default -is to continue showing the panel and no example is added to weston.ini -because it's an uncommon request. - -Tested-by: Pekka Paalanen ---- - ---- a/clients/desktop-shell.c 2015-11-05 11:51:26.272052133 +0000 -+++ b/clients/desktop-shell.c 2015-11-05 11:56:19.666887702 +0000 -@@ -1130,7 +1130,8 @@ - output_destroy(struct output *output) - { - background_destroy(output->background); -- panel_destroy(output->panel); -+ if (output->panel) -+ panel_destroy(output->panel); - wl_output_destroy(output->output); - wl_list_remove(&output->link); - -@@ -1160,7 +1161,8 @@ - { - struct output *output = data; - -- window_set_buffer_transform(output->panel->window, transform); -+ if (output->panel) -+ window_set_buffer_transform(output->panel->window, transform); - window_set_buffer_transform(output->background->window, transform); - } - -@@ -1187,7 +1189,8 @@ - { - struct output *output = data; - -- window_set_buffer_scale(output->panel->window, scale); -+ if (output->panel) -+ window_set_buffer_scale(output->panel->window, scale); - window_set_buffer_scale(output->background->window, scale); - } - -@@ -1198,15 +1201,36 @@ - output_handle_scale - }; - -+static int -+want_panel(struct desktop *desktop) -+{ -+ struct weston_config_section *s; -+ char *location = NULL; -+ int ret = 1; -+ -+ s = weston_config_get_section(desktop->config, "shell", NULL, NULL); -+ weston_config_section_get_string(s, "panel-location", -+ &location, "top"); -+ -+ if (strcmp(location, "top") != 0) -+ ret = 0; -+ -+ free(location); -+ -+ return ret; -+} -+ - static void - output_init(struct output *output, struct desktop *desktop) - { - struct wl_surface *surface; - -- output->panel = panel_create(desktop); -- surface = window_get_wl_surface(output->panel->window); -- desktop_shell_set_panel(desktop->shell, -- output->output, surface); -+ if (want_panel(desktop)) { -+ output->panel = panel_create(desktop); -+ surface = window_get_wl_surface(output->panel->window); -+ desktop_shell_set_panel(desktop->shell, -+ output->output, surface); -+ } - - output->background = background_create(desktop); - surface = window_get_wl_surface(output->background->window); ---- a/man/weston.ini.man 2015-11-05 11:56:36.763111313 +0000 -+++ b/man/weston.ini.man 2015-11-05 12:06:57.097226512 +0000 -@@ -186,6 +186,11 @@ - .fi - .RE - .TP 7 -+.BI "panel-location=" top -+sets the location of the panel (string). Can be -+.B top, -+.B none. -+.TP 7 - .BI "locking=" true - enables screen locking (boolean). - .TP 7 diff --git a/meta-agl/recipes-graphics/wayland/weston_%.bbappend b/meta-agl/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 000000000..2ee7150e5 --- /dev/null +++ b/meta-agl/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,26 @@ +FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" + +SRC_URI_append = "\ + file://weston.service \ + file://weston.ini \ + " + +inherit systemd + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "weston.service" + +do_install_append() { + # Install systemd unit files + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -p -D ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service + fi + + WESTON_INI_CONFIG=${sysconfdir}/xdg/weston + install -d ${D}${WESTON_INI_CONFIG} + install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini +} + +FILES_${PN} += " \ + ${sysconfdir}/xdg/weston/weston.ini \ + " diff --git a/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend deleted file mode 100644 index 7167388d4..000000000 --- a/meta-agl/recipes-graphics/wayland/weston_1.5.0.bbappend +++ /dev/null @@ -1,28 +0,0 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" - -SRC_URI_append = "\ - file://0001-desktop-shell-add-option-to-avoid-creating-the-panel.patch \ - file://0001-Adapt-changes-made-in-libinput-src-evdev.c-for-touch.patch \ - file://weston.service \ - file://weston.ini \ - " - -inherit systemd - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "weston.service" - -do_install_append() { - # Install systemd unit files - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -p -D ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service - fi - - WESTON_INI_CONFIG=${sysconfdir}/xdg/weston - install -d ${D}${WESTON_INI_CONFIG} - install -m 0644 ${WORKDIR}/weston.ini ${D}${WESTON_INI_CONFIG}/weston.ini -} - -FILES_${PN} += " \ - ${sysconfdir}/xdg/weston/weston.ini \ - " -- cgit 1.2.3-korg