update weston to 1.5.0
authorRonan Le Martret <ronan@fridu.net>
Thu, 12 Jun 2014 10:02:54 +0000 (12:02 +0200)
committerRonan Le Martret <ronan@fridu.net>
Thu, 12 Jun 2014 10:02:54 +0000 (12:02 +0200)
Change-Id: Ia9f0ecfe426b4590c627604b694bb0b60d569d76
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
17 files changed:
recipes-core/dbus/dbus_1.8.2.bbappend [new file with mode: 0644]
recipes-graphics/wayland/weston/0001-Update-to-1.4.0.patch [deleted file]
recipes-graphics/wayland/weston/0001-downstream-allow-to-start-for-system-users.patch [new file with mode: 0644]
recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch [deleted file]
recipes-graphics/wayland/weston/0002-downstream-shell-make-panel-optional-panel-false-in-.patch [moved from recipes-graphics/wayland/weston/0011-shell-make-panel-optional-panel-false-in-weston.ini.patch with 70% similarity]
recipes-graphics/wayland/weston/0003-compositor-implement-xdg_surface_set_minimized.patch [deleted file]
recipes-graphics/wayland/weston/0003-downstream-Hack-to-allow-selecting-a-default-output.patch [moved from recipes-graphics/wayland/weston/0012-shell-1.4.0-Hack-to-allow-selecting-a-default-output.patch with 51% similarity]
recipes-graphics/wayland/weston/0004-compositor-use-Mod-Tab-to-show-raise-minimized-surfa.patch [deleted file]
recipes-graphics/wayland/weston/0005-toytoolkit-totally-switch-to-xdg-shell-protocol.patch [deleted file]
recipes-graphics/wayland/weston/0006-packaging-add-weston-editor-weston-subsurfaces-clien.patch [deleted file]
recipes-graphics/wayland/weston/0007-shell-position-input-panel-layer-above-fullscreen-la.patch [deleted file]
recipes-graphics/wayland/weston/0008-packaging-add-the-RDP-backend.patch [deleted file]
recipes-graphics/wayland/weston/0009-packaging-fix-the-RDP-backend-build.patch [deleted file]
recipes-graphics/wayland/weston/0010-packaging-fix-obs-build.patch [deleted file]
recipes-graphics/wayland/weston/0013-allow-to-start-weston-with-system-user.patch [deleted file]
recipes-graphics/wayland/weston_1.4.0.bbappend [deleted file]
recipes-graphics/wayland/weston_1.5.0.bbappend [new file with mode: 0644]

diff --git a/recipes-core/dbus/dbus_1.8.2.bbappend b/recipes-core/dbus/dbus_1.8.2.bbappend
new file mode 100644 (file)
index 0000000..e9a50fa
--- /dev/null
@@ -0,0 +1,33 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
+
+SRC_URI += " file://dbus-user.service \
+             file://dbus-user.socket \
+           "
+
+#SRC_URI += " file://0001-Set-correct-address-when-using-address-systemd.patch "
+
+SRC_URI += " file://0002-Add-_DBUS_GNUC_WARN_UNUSED_RESULT-similar-to-GLib-s.patch \
+             file://0003-DBusAtomic-on-Unix-use-pthreads-mutexes-for-fallback.patch \
+             file://0004-dbus_threads_init-call-_dbus_threads_init_platform_s.patch \
+             file://0005-dbus_threads_init_default-dbus_threads_init-be-safe-.patch \
+             file://0006-Remove-unused-global-mutexes-for-win_fds-sid_atom_ca.patch \
+             file://0007-Turn-a-runtime-assertion-into-a-compile-time-asserti.patch \
+             file://0008-Replace-individual-global-lock-variables-with-an-arr.patch \
+             file://0009-Make-taking-a-global-lock-automatically-initialize-l.patch \
+             file://0010-Always-initialize-threading-before-allocating-a-dyna.patch \
+             file://0011-Add-a-statically-initialized-implementation-of-_dbus.patch \
+             file://0012-Enable-checking-of-smack-context-from-DBus-interface.patch \
+             file://0013-Enforce-smack-policy-from-conf-file.patch \
+           "
+
+do_install_append() {
+       mkdir -p ${D}${systemd_unitdir}/user
+       install -m 0644 ${WORKDIR}/dbus-user.service ${D}${systemd_unitdir}/user/dbus.service
+       install -m 0644 ${WORKDIR}/dbus-user.socket ${D}${systemd_unitdir}/user/dbus.socket
+}
+
+FILES_${PN} += "${systemd_unitdir}/user/dbus.service \
+               ${systemd_unitdir}/user/dbus.socket \
+              "
+
+EXTRA_OECONF += " --enable-smack "
diff --git a/recipes-graphics/wayland/weston/0001-Update-to-1.4.0.patch b/recipes-graphics/wayland/weston/0001-Update-to-1.4.0.patch
deleted file mode 100644 (file)
index 2ec5f41..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-From 804c40d5e1d0f4a42db1cbc7d6cf0666b82c1e7d Mon Sep 17 00:00:00 2001
-From: Ossama Othman <ossama.othman@intel.com>
-Date: Wed, 12 Feb 2014 14:17:21 -0800
-Subject: [PATCH 01/13] Update to 1.4.0
-
-Change-Id: I17dab833c810374f13cf79672690a09a92ef1fb7
-Signed-off-by: Ossama Othman <ossama.othman@intel.com>
----
- .gbs.conf                 |   3 +
- packaging/weston.changes  | 104 +++++++++++++++++++++++++++++
- packaging/weston.manifest |   8 +++
- packaging/weston.spec     | 164 ++++++++++++++++++++++++++++++++++++++++++++++
- packaging/weston.target   |   5 ++
- 5 files changed, 284 insertions(+)
- create mode 100644 .gbs.conf
- create mode 100644 packaging/weston.changes
- create mode 100644 packaging/weston.manifest
- create mode 100644 packaging/weston.spec
- create mode 100644 packaging/weston.target
-
-diff --git a/.gbs.conf b/.gbs.conf
-new file mode 100644
-index 0000000..fa9fdc5
---- /dev/null
-+++ b/.gbs.conf
-@@ -0,0 +1,3 @@
-+[general]
-+upstream_branch = upstream
-+upstream_tag = ${upstreamversion}
-diff --git a/packaging/weston.changes b/packaging/weston.changes
-new file mode 100644
-index 0000000..e2beff6
---- /dev/null
-+++ b/packaging/weston.changes
-@@ -0,0 +1,104 @@
-+* Wed Feb 12 2014 Ossama Othman <ossama.othman@intel.com> 1.4.0@d601bc0
-+- Update to 1.4.0
-+
-+* Tue Jan 21 2014 Ossama Othman <ossama.othman@intel.com> accepted/tizen/generic/20140106.132549@36d486f
-+- Clarified comment about weston-startup virtual package rationale.
-+- weston-launch SMACK exec label is now set in weston systemd unit file.
-+- [TIVI-2213] Moved IVI files to weston-ivi and ico-uxf-homescreen-sample-apps.
-+
-+* Tue Dec 10 2013 Ossama Othman <ossama.othman@intel.com> accepted/tizen/20131204.185237@e803629
-+- v2:Fix [PTREL-522] Weston local build failed for X-Free repo.
-+
-+* Mon Dec 02 2013 Ossama Othman <ossama.othman@intel.com> accepted/tizen/20131127.212429@21af2d3
-+- build failure fix (remove X dependencies)
-+- This vfunc lets us read out a rectangle of pixels from the currently attached surface buffer.
-+- Remove cairo-xcb dependency in spec file.
-+
-+* Fri Nov 22 2013 Ossama Othman <ossama.othman@intel.com> submit/tizen/20131122.063157@9f36b8a
-+- Don't build xwayland and xwayland-test
-+- Assign weston-launch to the User Smack domain.
-+
-+* Wed Nov 06 2013 Ossama Othman <ossama.othman@intel.com> 1.3.1@a6a11fb
-+- Update to 1.3.1
-+
-+* Thu Oct 17 2013 Ossama Othman <ossama.othman@intel.com> 1.3.0@95659c0
-+- Update to 1.3.0
-+
-+* Thu Oct 03 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130925.220757@8c7ed3e
-+- TIVI-1828: Make EFL apps use the wayland-based input method.
-+- TIVI-1828: Install weekeyboard.xml app metadata file.
-+- TIVI-1919: Associate the Giantec display with HDMI1
-+
-+* Wed Sep 25 2013 Ossama Othman <ossama.othman@intel.com> accepted/tizen/20130925.103624@58d1a75
-+- Adding calibration values and bind HDMI output with touch screen of chelong monitor
-+
-+* Mon Sep 23 2013 Ossama Othman <ossama.othman@intel.com> accepted/tizen/20130918.214754@10eaa44
-+- TIVI-1726: Not add output->x/y when caculating the absolute value of touch postion.
-+- We have the calibrator for touch and delete touch quirk
-+
-+* Tue Sep 17 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130909.204211@5560428
-+- TIVI-1771: Fix browser metadata so homescreen can find its surface
-+- Added DBUS_SESSION_BUS_ADDRESS in /etc/profile.d/weston.sh (Bug TIVI-1686 and other bugs related to dbus)
-+
-+* Mon Sep 09 2013 Ossama Othman <ossama.othman@intel.com> 1.2.2@59772da
-+- Add support for device quirks, such as swapped axes.
-+- Add Tizen IVI weston packaging files.
-+- Update to 1.2.2
-+
-+* Wed Aug 28 2013 Ossama Othman <ossama.othman@intel.com> submit/tizen/20130823.165548@163279b
-+- evdev: Initliaze device->link so we can wl_list_remove() without crashing
-+- Fix TIVI-1679
-+
-+* Thu Aug 22 2013 Ossama Othman <ossama.othman@intel.com> 1.2.0@56c32bd
-+- Update to 1.2.1
-+
-+* Thu Aug 01 2013 Ossama Othman <ossama.othman@intel.com> submit/tizen/20130726.203035@2a224be
-+- Add initial touch support to clients.
-+
-+* Fri Jul 26 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130725.223721@872ba32
-+- Add calibration values for chelong display
-+
-+* Thu Jul 25 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130719.063456@cd5293b
-+- TIVI-1086: Fix handling of touch device
-+- Add a new clients subpackage
-+
-+* Wed Jul 24 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130719.063456@a7bec7a
-+- Add a new clients subpackage
-+
-+* Tue Jul 16 2013 Ossama Othman <ossama.othman@intel.com> 1.2.0@1427ac4
-+- Update to 1.2.0
-+
-+* Thu Jun 27 2013 Rusty Lynch <rusty.lynch@intel.com> accepted/tizen/20130627.155212@597c6fc
-+- TIVI-1063: Disable lockscreen
-+
-+* Wed Jun 26 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130624.224834@a4a42d8
-+- Add tizen environment file
-+
-+* Mon Jun 24 2013 Rusty Lynch <rusty.lynch@intel.com> submit/tizen/20130620.235949@109d186
-+- Add udev rule to quirk the touchscreen on Chelong
-+- compositor-drm: Add quirk loading from udev
-+- evdev: Add support for device quirks and implement axes swapping
-+
-+* Thu Jun 20 2013 Rusty Lynch <rusty.lynch@intel.com> 1.1.1@f7089fb
-+- weston-launch: Run weston in the user login shell
-+- weston-launch: Don't exit on SIGTERM
-+- Update to 1.1.1
-+
-+* Wed Jun 05 2013 Rusty Lynch <rusty.lynch@intel.com> 1.1.0@9d774db
-+- Update to 1.1.0
-+
-+* Thu Apr 11 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130411.235236@639026a
-+- Also package devel sub-package for header files
-+
-+* Thu Apr 11 2013 Anas Nashif <anas.nashif@intel.com> 1.0.6@aa865ba
-+- Update to 1.0.6
-+
-+* Wed Feb 13 2013 Anas Nashif <anas.nashif@intel.com> 1.0.4@d32e140
-+- Update to 1.0.4
-+
-+* Mon Dec 17 2012 Anas Nashif <anas.nashif@intel.com> 1.0.3@85b1093
-+- Update to 1.0.3
-+
-+* Fri Nov 30 2012 Anas Nashif <anas.nashif@intel.com> 57b751b
-+- Update to 1.0.2
-+
-diff --git a/packaging/weston.manifest b/packaging/weston.manifest
-new file mode 100644
-index 0000000..da32097
---- /dev/null
-+++ b/packaging/weston.manifest
-@@ -0,0 +1,8 @@
-+<manifest>
-+ <request>
-+    <domain name="_"/>
-+ </request>
-+ <assign>
-+    <filesystem path="/usr/bin/weston-launch" exec_label="User" />
-+ </assign>
-+</manifest>
-diff --git a/packaging/weston.spec b/packaging/weston.spec
-new file mode 100644
-index 0000000..84d2cb8
---- /dev/null
-+++ b/packaging/weston.spec
-@@ -0,0 +1,164 @@
-+%bcond_with wayland
-+%bcond_with mobile
-+%define _unitdir_user /usr/lib/systemd/user
-+
-+%if %{with mobile}
-+%define extra_config_options --disable-drm-compositor
-+%endif
-+
-+Name:           weston
-+Version:        1.4.0
-+Release:        0
-+Summary:        Wayland Compositor Infrastructure
-+License:        MIT
-+Group:          Graphics & UI Framework/Wayland Window System
-+Url:            http://weston.freedesktop.org/
-+
-+#Git-Clone:   git://anongit.freedesktop.org/wayland/weston
-+#Git-Web:     http://cgit.freedesktop.org/wayland/weston/
-+Source0:         %name-%version.tar.xz
-+Source1:        weston.target
-+Source1001:   weston.manifest
-+BuildRequires:        autoconf >= 2.64, automake >= 1.11
-+BuildRequires:  expat-devel
-+BuildRequires:  libjpeg-devel
-+BuildRequires:  libtool >= 2.2
-+BuildRequires:  libvpx-devel
-+BuildRequires:  pam-devel
-+BuildRequires:  pkgconfig
-+BuildRequires:  xz
-+BuildRequires:  pkgconfig(cairo)
-+BuildRequires:  pkgconfig(cairo-egl) >= 1.11.3
-+BuildRequires:  pkgconfig(egl) >= 7.10
-+BuildRequires:  pkgconfig(gbm)
-+BuildRequires:  pkgconfig(gio-2.0)
-+BuildRequires:  pkgconfig(glesv2)
-+BuildRequires:  pkgconfig(glib-2.0)
-+BuildRequires:  pkgconfig(gobject-2.0)
-+BuildRequires:  pkgconfig(libdrm) >= 2.4.30
-+BuildRequires:  pkgconfig(libffi)
-+BuildRequires:  pkgconfig(libsystemd-login)
-+BuildRequires:  pkgconfig(libudev) >= 136
-+BuildRequires:  pkgconfig(mtdev) >= 1.1.0
-+BuildRequires:  pkgconfig(pixman-1)
-+BuildRequires:  pkgconfig(poppler-glib)
-+BuildRequires:  pkgconfig(wayland-client)
-+BuildRequires:  pkgconfig(wayland-egl)
-+BuildRequires:  pkgconfig(wayland-server)
-+BuildRequires:  pkgconfig(xkbcommon) >= 0.3.0
-+Requires:       weston-startup
-+Requires(pre):  /usr/sbin/groupadd
-+
-+%if !%{with wayland}
-+ExclusiveArch:
-+%endif
-+
-+
-+%description
-+Weston is the reference implementation of a Wayland compositor, and a
-+useful compositor in its own right. Weston has various backends that
-+lets it run on Linux kernel modesetting and evdev input as well as
-+under X11. Weston ships with a few example clients, from simple
-+clients that demonstrate certain aspects of the protocol to more
-+complete clients and a simplistic toolkit. There is also a quite
-+capable terminal emulator (weston-terminal) and an toy/example
-+desktop shell. Finally, weston also provides integration with the
-+Xorg server and can pull X clients into the Wayland desktop and act
-+as a X window manager.
-+
-+
-+%package devel
-+Summary: Development files for package %{name}
-+Group:   Graphics & UI Framework/Development
-+%description devel
-+This package provides header files and other developer releated files
-+for package %{name}.
-+
-+%package clients
-+Summary: Sample clients for package %{name}
-+Group:   Graphics & UI Framework/Development
-+%description clients
-+This package provides a set of example wayland clients useful for
-+validating the functionality of wayland with very little dependencies
-+on other system components.
-+
-+%prep
-+%setup -q
-+cp %{SOURCE1001} .
-+
-+%build
-+%autogen --disable-static --disable-setuid-install  --enable-simple-clients --enable-clients --disable-libunwind --disable-xwayland --disable-xwayland-test --disable-x11-compositor --disable-rpi-compositor %{?extra_config_options:%extra_config_options}
-+make %{?_smp_mflags}
-+
-+%install
-+%make_install
-+
-+# install example clients
-+install -m 755 clients/weston-simple-touch %{buildroot}%{_bindir}
-+install -m 755 clients/weston-simple-shm %{buildroot}%{_bindir}
-+install -m 755 clients/weston-simple-egl %{buildroot}%{_bindir}
-+install -m 755 clients/weston-flower %{buildroot}%{_bindir}
-+install -m 755 clients/weston-image %{buildroot}%{_bindir}
-+install -m 755 clients/weston-cliptest %{buildroot}%{_bindir}
-+install -m 755 clients/weston-dnd %{buildroot}%{_bindir}
-+install -m 755 clients/weston-smoke %{buildroot}%{_bindir}
-+install -m 755 clients/weston-resizor %{buildroot}%{_bindir}
-+install -m 755 clients/weston-eventdemo %{buildroot}%{_bindir}
-+install -m 755 clients/weston-clickdot %{buildroot}%{_bindir}
-+install -m 755 clients/weston-transformed %{buildroot}%{_bindir}
-+install -m 755 clients/weston-fullscreen %{buildroot}%{_bindir}
-+install -m 755 clients/weston-calibrator %{buildroot}%{_bindir}
-+
-+install -d %{buildroot}%{_unitdir_user}
-+install -m 644 %{SOURCE1} %{buildroot}%{_unitdir_user}/weston.target
-+# The weston.service unit file must be provided by the weston-startup
-+# virtual package, i.e. "Provide: weston-startup".  The weston-startup
-+# virtual package requirement is intended to force Tizen profile
-+# maintainers to add the necessary start-up script or systemd unit
-+# file to start weston. Otherwise it becomes possible to install
-+# weston without an automated means to start weston at boot, which may
-+# lead to confusion.  This approach allows startup related files to be
-+# maintained outside of this weston package.
-+
-+%pre
-+getent group weston-launch >/dev/null || %{_sbindir}/groupadd -o -r weston-launch
-+
-+%docs_package
-+
-+%files
-+%manifest %{name}.manifest
-+%defattr(-,root,root)
-+%license COPYING
-+%_bindir/wcap-*
-+%_bindir/weston
-+%_bindir/weston-info
-+%attr(4755,root,root) %{_bindir}/weston-launch
-+%{_bindir}/weston-terminal
-+%_libexecdir/weston-*
-+%_libdir/weston
-+%_datadir/weston
-+%{_unitdir_user}/weston.target
-+
-+%files devel
-+%manifest %{name}.manifest
-+%_includedir/weston/*.h
-+%_libdir/pkgconfig/*.pc
-+
-+%files clients
-+%manifest %{name}.manifest
-+%_bindir/weston-simple-touch
-+%_bindir/weston-simple-shm
-+%_bindir/weston-simple-egl
-+%_bindir/weston-flower
-+%_bindir/weston-image
-+%_bindir/weston-cliptest
-+%_bindir/weston-dnd
-+%_bindir/weston-smoke
-+%_bindir/weston-resizor
-+%_bindir/weston-eventdemo
-+%_bindir/weston-clickdot
-+%_bindir/weston-transformed
-+%_bindir/weston-fullscreen
-+%_bindir/weston-calibrator
-+
-+%changelog
-diff --git a/packaging/weston.target b/packaging/weston.target
-new file mode 100644
-index 0000000..2717047
---- /dev/null
-+++ b/packaging/weston.target
-@@ -0,0 +1,5 @@
-+
-+[Unit]
-+Description=Weston Compositor
-+Requires=dbus.socket
-+AllowIsolate=true
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0001-downstream-allow-to-start-for-system-users.patch b/recipes-graphics/wayland/weston/0001-downstream-allow-to-start-for-system-users.patch
new file mode 100644 (file)
index 0000000..eefaeb4
--- /dev/null
@@ -0,0 +1,26 @@
+From: Philippe Coval <philippe.coval@open.eurogiciel.org>
+Date: Tue, 10 Jun 2014 15:01:27 +0200
+Subject: downstream: allow to start for system users
+
+Change-Id: I1529784d5dd9ce30e595de80c66d895d97338ff8
+Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
+---
+ src/launcher-util.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/launcher-util.c b/src/launcher-util.c
+index ac764dc..f53bb33 100644
+--- a/src/launcher-util.c
++++ b/src/launcher-util.c
+@@ -409,7 +409,11 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
+                                         seat_id, tty);
+               if (r < 0) {
+                       launcher->logind = NULL;
++#ifdef LOCAL_CONFIG_WESTON_ALLOW_SYS_UID
++                      if (geteuid() <= 499) { /* 499 = SYS_UID_MAX in login.defs, but it should be parsed */
++#else
+                       if (geteuid() == 0) {
++#endif
+                               if (setup_tty(launcher, tty) == -1) {
+                                       free(launcher);
+                                       return NULL;
diff --git a/recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch b/recipes-graphics/wayland/weston/0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch
deleted file mode 100644 (file)
index 4275d3d..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-From 13640d5c849085fa2b099c2d54e656eec8a1318f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= <krh@bitplanet.net>
-Date: Wed, 29 Jan 2014 15:55:09 +0900
-Subject: [PATCH 02/13] This vfunc lets us read out a rectangle of pixels from
- the currently attached surface buffer.
-
-Change-Id: Ia12d01fd0d157654602a2c46dd5874218252dd2f
----
- src/compositor.h  |  3 +++
- src/gl-renderer.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 57 insertions(+)
-
-diff --git a/src/compositor.h b/src/compositor.h
-index 22a485f..ace75da 100644
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -540,6 +540,9 @@ struct weston_renderer {
-                              pixman_format_code_t format, void *pixels,
-                              uint32_t x, uint32_t y,
-                              uint32_t width, uint32_t height);
-+      int (*read_surface_pixels)(struct weston_surface *es,
-+                                 pixman_format_code_t format, void *pixels,
-+                                 int x, int y, int width, int height);
-       void (*repaint_output)(struct weston_output *output,
-                              pixman_region32_t *output_damage);
-       void (*flush_damage)(struct weston_surface *surface);
-diff --git a/src/gl-renderer.c b/src/gl-renderer.c
-index 0e5afbe..dca2e05 100644
---- a/src/gl-renderer.c
-+++ b/src/gl-renderer.c
-@@ -106,6 +106,8 @@ struct gl_renderer {
-       EGLContext egl_context;
-       EGLConfig egl_config;
-+      GLuint fbo;
-+
-       struct wl_array vertices;
-       struct wl_array vtxcnt;
-@@ -585,6 +587,54 @@ out:
-       pixman_region32_fini(&repaint);
- }
-+static int
-+gl_renderer_read_surface_pixels(struct weston_surface *es,
-+                              pixman_format_code_t format, void *pixels,
-+                              int x, int y, int width, int height)
-+{
-+      struct weston_buffer *buffer = es->buffer_ref.buffer;
-+      struct weston_compositor *ec = es->compositor;
-+      struct gl_renderer *gr = get_renderer(ec);
-+      struct gl_surface_state *gs = get_surface_state(es);
-+      GLenum gl_format;
-+      int size;
-+      struct wl_shm_buffer *shm_buffer = NULL;
-+
-+      switch (format) {
-+      case PIXMAN_a8r8g8b8:
-+              gl_format = GL_BGRA_EXT;
-+              break;
-+      case PIXMAN_a8b8g8r8:
-+              gl_format = GL_RGBA;
-+              break;
-+      default:
-+              return -1;
-+      }
-+
-+        if (buffer) {
-+              shm_buffer = wl_shm_buffer_get(buffer->resource);
-+      }
-+      if (shm_buffer) {
-+              size = buffer->width * 4 * buffer->height;
-+              memcpy(pixels, wl_shm_buffer_get_data(shm_buffer), size);
-+      } else {
-+              if (gr->fbo == 0)
-+                      glGenFramebuffers(1, &gr->fbo);
-+              glBindFramebuffer(GL_FRAMEBUFFER, gr->fbo);
-+              glFramebufferTexture2D(GL_FRAMEBUFFER,
-+                                     GL_COLOR_ATTACHMENT0,
-+                                     GL_TEXTURE_2D,
-+                                     gs->textures[0], 0);
-+
-+              glReadPixels(x, y, width, height,
-+                           gl_format, GL_UNSIGNED_BYTE, pixels);
-+
-+              glBindFramebuffer(GL_FRAMEBUFFER, 0);
-+      }
-+
-+      return 0;
-+}
-+
- static void
- repaint_views(struct weston_output *output, pixman_region32_t *damage)
- {
-@@ -1602,6 +1652,9 @@ gl_renderer_destroy(struct weston_compositor *ec)
-       wl_signal_emit(&gr->destroy_signal, gr);
-+      if (gr->fbo)
-+              glDeleteFramebuffers(1, &gr->fbo);
-+
-       if (gr->has_bind_display)
-               gr->unbind_display(gr->egl_display, ec->wl_display);
-@@ -1699,6 +1752,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLNativeDisplayType display,
-               return -1;
-       gr->base.read_pixels = gl_renderer_read_pixels;
-+      gr->base.read_surface_pixels = gl_renderer_read_surface_pixels;
-       gr->base.repaint_output = gl_renderer_repaint_output;
-       gr->base.flush_damage = gl_renderer_flush_damage;
-       gr->base.attach = gl_renderer_attach;
--- 
-1.8.1.4
-
@@ -1,17 +1,17 @@
-From 63fb11604751406fe80f75de5452009bf0d03772 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Mon, 7 Apr 2014 15:43:51 +0200
-Subject: [PATCH 11/13] shell: make panel optional ("panel=false" in
- weston.ini)
+From: Philippe Coval <philippe.coval@open.eurogiciel.org>
+Date: Tue, 10 Jun 2014 15:17:46 +0200
+Subject: downstream: shell: make panel optional panel false in weston.ini
 
-Change-Id: I6b2e9ee24f623c4b05f3cd675a90007bf708b09b
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
+Adapted from Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> hack
+
+Change-Id: I110503d03a6ac495c3394cec99ab841ce27c02c9
+Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
 ---
- clients/desktop-shell.c | 27 ++++++++++++++++++---------
- 1 file changed, 18 insertions(+), 9 deletions(-)
+ clients/desktop-shell.c | 30 ++++++++++++++++++------------
+ 1 file changed, 18 insertions(+), 12 deletions(-)
 
 diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
-index a0c6b6d..ad67ad2 100644
+index e121cc7..161d3ac 100644
 --- a/clients/desktop-shell.c
 +++ b/clients/desktop-shell.c
 @@ -62,6 +62,7 @@ struct desktop {
@@ -35,7 +35,7 @@ index a0c6b6d..ad67ad2 100644
                if (output->background && !output->background->painted)
                        return 0;
        }
-@@ -1127,7 +1130,8 @@ static void
+@@ -1130,7 +1133,8 @@ static void
  output_destroy(struct output *output)
  {
        background_destroy(output->background);
@@ -45,35 +45,38 @@ index a0c6b6d..ad67ad2 100644
        wl_output_destroy(output->output);
        wl_list_remove(&output->link);
  
-@@ -1157,7 +1161,8 @@ output_handle_geometry(void *data,
+@@ -1159,8 +1163,8 @@ output_handle_geometry(void *data,
+                        int transform)
  {
        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);
  }
  
-@@ -1184,7 +1189,8 @@ output_handle_scale(void *data,
+@@ -1186,8 +1190,8 @@ output_handle_scale(void *data,
+                     int32_t scale)
  {
        struct output *output = data;
+-
 -      window_set_buffer_scale(output->panel->window, scale);
-+      if (output->panel)
++      if(output->panel)
 +              window_set_buffer_scale(output->panel->window, scale);
        window_set_buffer_scale(output->background->window, scale);
  }
  
-@@ -1200,10 +1206,12 @@ output_init(struct output *output, struct desktop *desktop)
+@@ -1202,11 +1206,12 @@ 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 (desktop->panel) {
++      if(output->panel) {
 +              output->panel = panel_create(desktop);
 +              surface = window_get_wl_surface(output->panel->window);
 +              desktop_shell_set_panel(desktop->shell,
@@ -82,7 +85,7 @@ index a0c6b6d..ad67ad2 100644
  
        output->background = background_create(desktop);
        surface = window_get_wl_surface(output->background->window);
-@@ -1316,6 +1324,7 @@ int main(int argc, char *argv[])
+@@ -1319,6 +1324,7 @@ int main(int argc, char *argv[])
        desktop.config = weston_config_parse("weston.ini");
        s = weston_config_get_section(desktop.config, "shell", NULL, NULL);
        weston_config_section_get_bool(s, "locking", &desktop.locking, 1);
@@ -90,6 +93,3 @@ index a0c6b6d..ad67ad2 100644
  
        desktop.display = display_create(&argc, argv);
        if (desktop.display == NULL) {
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0003-compositor-implement-xdg_surface_set_minimized.patch b/recipes-graphics/wayland/weston/0003-compositor-implement-xdg_surface_set_minimized.patch
deleted file mode 100644 (file)
index 30741cd..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-From cb6dd95704b8dbf2344d0c5008e0739cf8740438 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Wed, 26 Feb 2014 16:43:59 +0100
-Subject: [PATCH 03/13] compositor: implement xdg_surface_set_minimized()
-
-We now handle the client-side xdg_surface_set_minimized()
-call, and eventually hide the target surface by moving it
-to a dedicated layer.
-
-Bug-Tizen: TIVI-2792
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53214
-Origin: http://lists.freedesktop.org/archives/wayland-devel/2014-February/013471.html
-
-Change-Id: I4894a9c384ecae8ef1d3f37b84d4d8eb1594a1a1
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- desktop-shell/shell.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++-
- desktop-shell/shell.h |  2 ++
- 2 files changed, 65 insertions(+), 1 deletion(-)
-
-diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index c275543..b8cd32b 100644
---- a/desktop-shell/shell.c
-+++ b/desktop-shell/shell.c
-@@ -2383,6 +2383,53 @@ unset_maximized(struct shell_surface *shsurf)
- }
- static void
-+set_minimized(struct weston_surface *surface, uint32_t is_true)
-+{
-+      struct shell_surface *shsurf;
-+      struct workspace *current_ws;
-+      struct weston_seat *seat;
-+      struct weston_surface *focus;
-+      struct weston_view *view;
-+
-+      view = get_default_view(surface);
-+      if (!view)
-+              return;
-+
-+      assert(weston_surface_get_main_surface(view->surface) == view->surface);
-+
-+      shsurf = get_shell_surface(surface);
-+      current_ws = get_current_workspace(shsurf->shell);
-+
-+      wl_list_remove(&view->layer_link);
-+       /* hide or show, depending on the state */
-+      if (is_true) {
-+              wl_list_insert(&shsurf->shell->minimized_layer.view_list, &view->layer_link);
-+
-+              drop_focus_state(shsurf->shell, current_ws, view->surface);
-+              wl_list_for_each(seat, &shsurf->shell->compositor->seat_list, link) {
-+                      if (!seat->keyboard)
-+                              continue;
-+                      focus = weston_surface_get_main_surface(seat->keyboard->focus);
-+                      if (focus == view->surface)
-+                              weston_keyboard_set_focus(seat->keyboard, NULL);
-+              }
-+      }
-+      else {
-+              wl_list_insert(&current_ws->layer.view_list, &view->layer_link);
-+
-+              wl_list_for_each(seat, &shsurf->shell->compositor->seat_list, link) {
-+                      if (!seat->keyboard)
-+                              continue;
-+                      activate(shsurf->shell, view->surface, seat);
-+              }
-+      }
-+
-+      shell_surface_update_child_surface_layers(shsurf);
-+
-+      weston_view_damage_below(view);
-+}
-+
-+static void
- shell_surface_set_maximized(struct wl_client *client,
-                             struct wl_resource *resource,
-                             struct wl_resource *output_resource)
-@@ -3251,6 +3298,19 @@ xdg_surface_unset_maximized(struct wl_client *client,
-       shsurf->client->send_configure(shsurf->surface, 0, width, height);
- }
-+static void
-+xdg_surface_set_minimized(struct wl_client *client,
-+                          struct wl_resource *resource)
-+{
-+      struct shell_surface *shsurf = wl_resource_get_user_data(resource);
-+
-+      if (shsurf->type != SHELL_SURFACE_TOPLEVEL)
-+              return;
-+
-+       /* apply compositor's own minimization logic (hide) */
-+      set_minimized(shsurf->surface, 1);
-+}
-+
- static const struct xdg_surface_interface xdg_surface_implementation = {
-       xdg_surface_destroy,
-       xdg_surface_set_transient_for,
-@@ -3264,7 +3324,7 @@ static const struct xdg_surface_interface xdg_surface_implementation = {
-       xdg_surface_unset_fullscreen,
-       xdg_surface_set_maximized,
-       xdg_surface_unset_maximized,
--      NULL /* set_minimized */
-+      xdg_surface_set_minimized
- };
- static void
-@@ -5673,6 +5733,8 @@ module_init(struct weston_compositor *ec,
-       }
-       activate_workspace(shell, 0);
-+      weston_layer_init(&shell->minimized_layer, NULL);
-+
-       wl_list_init(&shell->workspaces.anim_sticky_list);
-       wl_list_init(&shell->workspaces.animation.link);
-       shell->workspaces.animation.frame = animate_workspace_change_frame;
-diff --git a/desktop-shell/shell.h b/desktop-shell/shell.h
-index dbb2854..e89fc9c 100644
---- a/desktop-shell/shell.h
-+++ b/desktop-shell/shell.h
-@@ -183,6 +183,8 @@ struct desktop_shell {
-       enum animation_type startup_animation_type;
-       enum animation_type focus_animation_type;
-+      struct weston_layer minimized_layer;
-+
-       struct wl_listener output_create_listener;
-       struct wl_list output_list;
--- 
-1.8.1.4
-
@@ -1,28 +1,25 @@
-From bdb907107b377633a870b164e706a731a2279321 Mon Sep 17 00:00:00 2001
-From: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-Date: Fri, 11 Apr 2014 22:09:19 +0200
-Subject: [PATCH 12/13] shell 1.4.0: Hack to allow selecting a default output
+From: Philippe Coval <philippe.coval@open.eurogiciel.org>
+Date: Tue, 10 Jun 2014 15:29:57 +0200
+Subject: downstream: Hack to allow selecting a default output
 
-Ported patch from Rafael Antognolli <rafael.antognolli@intel.com>
+This code originally by Rafael Antognolli <rafael.antognolli@intel.com>
+was commited by Stephane Desneux <stephane.desneux@open.eurogiciel.org>
+as packaging patch
 
-Use default_output=1 inside an output section on weston.ini to make it
-the default one. Any newly created maximized or fullscreen window, that
-does not specify its output, will default to use that one.
-
-Change-Id: I8b888d1de6c5e76e89e9b61b35ffc3401ac86100
-Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
+Change-Id: I48a8cb074f48debe027ca9cf42878ec0a3726044
+Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
 ---
  desktop-shell/shell.c |  2 ++
- src/compositor-drm.c  | 13 +++++++++----
- src/compositor-x11.c  | 16 ++++++++++++----
+ src/compositor-drm.c  |  5 +++++
+ src/compositor-x11.c  | 15 ++++++++++++---
  src/compositor.h      |  3 +++
- 4 files changed, 26 insertions(+), 8 deletions(-)
+ 4 files changed, 22 insertions(+), 3 deletions(-)
 
 diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index 8cd4401..57c2710 100644
+index 84f5c83..4eef849 100644
 --- a/desktop-shell/shell.c
 +++ b/desktop-shell/shell.c
-@@ -471,6 +471,8 @@ shell_configuration(struct desktop_shell *shell)
+@@ -488,6 +488,8 @@ shell_configuration(struct desktop_shell *shell)
  struct weston_output *
  get_default_output(struct weston_compositor *compositor)
  {
@@ -32,23 +29,10 @@ index 8cd4401..57c2710 100644
                            struct weston_output, link);
  }
 diff --git a/src/compositor-drm.c b/src/compositor-drm.c
-index 154e15e..933a91d 100644
+index 7d514e4..9c29dd5 100644
 --- a/src/compositor-drm.c
 +++ b/src/compositor-drm.c
-@@ -1166,10 +1166,10 @@ choose_mode (struct drm_output *output, struct weston_mode *target_mode)
-       wl_list_for_each(mode, &output->base.mode_list, base.link) {
-               if (mode->mode_info.hdisplay == target_mode->width &&
-                   mode->mode_info.vdisplay == target_mode->height) {
--                      if (mode->mode_info.vrefresh == target_mode->refresh || 
-+                      if (mode->mode_info.vrefresh == target_mode->refresh ||
-                           target_mode->refresh == 0) {
-                               return mode;
--                      } else if (!tmp_mode) 
-+                      } else if (!tmp_mode)
-                               tmp_mode = mode;
-               }
-       }
-@@ -1870,6 +1870,7 @@ create_output_for_connector(struct drm_compositor *ec,
+@@ -1906,6 +1906,7 @@ create_output_for_connector(struct drm_compositor *ec,
        const char *type_name;
        enum output_config config;
        uint32_t transform;
@@ -56,16 +40,16 @@ index 154e15e..933a91d 100644
  
        i = find_crtc_for_connector(ec, resources, connector);
        if (i < 0) {
-@@ -1918,6 +1919,8 @@ create_output_for_connector(struct drm_compositor *ec,
+@@ -1954,6 +1955,8 @@ create_output_for_connector(struct drm_compositor *ec,
        weston_config_section_get_string(section, "transform", &s, "normal");
        transform = parse_transform(s, output->base.name);
        free(s);
 +      weston_config_section_get_int(section, "default_output",
 +                    &default_output, 0);
  
-       weston_config_section_get_string(section, "seat", &s, "");
-       setup_output_seat_constraint(ec, &output->base, s);
-@@ -2035,6 +2038,8 @@ create_output_for_connector(struct drm_compositor *ec,
+       if (get_gbm_format_from_section(section,
+                                       ec->format,
+@@ -2076,6 +2079,8 @@ create_output_for_connector(struct drm_compositor *ec,
        }
  
        wl_list_insert(ec->base.output_list.prev, &output->base.link);
@@ -74,38 +58,11 @@ index 154e15e..933a91d 100644
  
        find_and_parse_output_edid(ec, output, connector);
        if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
-@@ -2286,7 +2291,7 @@ update_outputs(struct drm_compositor *ec, struct udev_device *drm_device)
-               }
-       }
--      /* FIXME: handle zero outputs, without terminating */   
-+      /* FIXME: handle zero outputs, without terminating */
-       if (ec->connector_allocator == 0)
-               wl_display_terminate(ec->base.wl_display);
- }
-@@ -2380,7 +2385,7 @@ drm_compositor_set_modes(struct drm_compositor *compositor)
-               if (ret < 0) {
-                       weston_log(
-                               "failed to set mode %dx%d for output at %d,%d: %m\n",
--                              drm_mode->base.width, drm_mode->base.height, 
-+                              drm_mode->base.width, drm_mode->base.height,
-                               output->base.x, output->base.y);
-               }
-       }
 diff --git a/src/compositor-x11.c b/src/compositor-x11.c
-index 6b5eb64..b742d00 100644
+index 56b3228..bf32e1a 100644
 --- a/src/compositor-x11.c
 +++ b/src/compositor-x11.c
-@@ -505,7 +505,7 @@ x11_output_set_wm_protocols(struct x11_compositor *c,
-       xcb_atom_t list[1];
-       list[0] = c->atom.wm_delete_window;
--      xcb_change_property (c->conn, 
-+      xcb_change_property (c->conn,
-                            XCB_PROP_MODE_REPLACE,
-                            output->window,
-                            c->atom.wm_protocols,
-@@ -751,7 +751,8 @@ static struct x11_output *
+@@ -752,7 +752,8 @@ static struct x11_output *
  x11_compositor_create_output(struct x11_compositor *c, int x, int y,
                             int width, int height, int fullscreen,
                             int no_input, char *configured_name,
@@ -115,7 +72,7 @@ index 6b5eb64..b742d00 100644
  {
        static const char name[] = "Weston Compositor";
        static const char class[] = "weston-1\0Weston Compositor";
-@@ -899,6 +900,8 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
+@@ -906,6 +907,8 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
                wl_event_loop_add_timer(loop, finish_frame_handler, output);
  
        wl_list_insert(c->base.output_list.prev, &output->base.link);
@@ -124,7 +81,7 @@ index 6b5eb64..b742d00 100644
  
        weston_log("x11 output %dx%d, window id %d\n",
                   width, height, output->window);
-@@ -1482,6 +1485,7 @@ x11_compositor_create(struct wl_display *display,
+@@ -1489,6 +1492,7 @@ x11_compositor_create(struct wl_display *display,
        const char *section_name;
        char *name, *t, *mode;
        uint32_t transform;
@@ -132,7 +89,7 @@ index 6b5eb64..b742d00 100644
  
        weston_log("initializing x11 backend\n");
  
-@@ -1567,11 +1571,14 @@ x11_compositor_create(struct wl_display *display,
+@@ -1578,11 +1582,14 @@ x11_compositor_create(struct wl_display *display,
                                                 "transform", &t, "normal");
                transform = parse_transform(t, name);
                free(t);
@@ -148,21 +105,22 @@ index 6b5eb64..b742d00 100644
                free(name);
                if (output == NULL)
                        goto err_x11_input;
-@@ -1586,7 +1593,8 @@ x11_compositor_create(struct wl_display *display,
+@@ -1597,7 +1604,9 @@ x11_compositor_create(struct wl_display *display,
        for (i = output_count; i < count; i++) {
                output = x11_compositor_create_output(c, x, 0, width, height,
                                                      fullscreen, no_input, NULL,
--                                                    WL_OUTPUT_TRANSFORM_NORMAL, 1);
-+                                                    WL_OUTPUT_TRANSFORM_NORMAL, 1,
-+                              default_output);
+-                                                    WL_OUTPUT_TRANSFORM_NORMAL, scale);
++                                                    WL_OUTPUT_TRANSFORM_NORMAL, scale,
++                                                    default_output);
++
                if (output == NULL)
                        goto err_x11_input;
                x = pixman_region32_extents(&output->base.region)->x2;
 diff --git a/src/compositor.h b/src/compositor.h
-index ace75da..297a4ec 100644
+index 057f8be..4fb8adc 100644
 --- a/src/compositor.h
 +++ b/src/compositor.h
-@@ -198,6 +198,7 @@ struct weston_output {
+@@ -199,6 +199,7 @@ struct weston_output {
        int move_x, move_y;
        uint32_t frame_time;
        int disable_planes;
@@ -170,7 +128,7 @@ index ace75da..297a4ec 100644
        int destroying;
  
        char *make, *model, *serial_number;
-@@ -604,6 +605,8 @@ struct weston_compositor {
+@@ -614,6 +615,8 @@ struct weston_compositor {
        struct wl_list axis_binding_list;
        struct wl_list debug_binding_list;
  
@@ -179,6 +137,3 @@ index ace75da..297a4ec 100644
        uint32_t state;
        struct wl_event_source *idle_source;
        uint32_t idle_inhibit;
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0004-compositor-use-Mod-Tab-to-show-raise-minimized-surfa.patch b/recipes-graphics/wayland/weston/0004-compositor-use-Mod-Tab-to-show-raise-minimized-surfa.patch
deleted file mode 100644 (file)
index e3a2776..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-From 8b5c42d8c95bf4b3f25ad767e0eb15b6b2c6710e Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Wed, 26 Feb 2014 17:11:22 +0100
-Subject: [PATCH 04/13] compositor: use Mod-Tab to show/raise minimized
- surfaces
-
-Temporarily show minimized surfaces when switching between
-surfaces with the keyboard. If the final selected one was
-minimized, it will be restored.
-
-Bug-Tizen: TIVI-2792
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53214
-Origin: http://lists.freedesktop.org/archives/wayland-devel/2014-February/013471.html
-
-Change-Id: I895f8d42bd89827b1a857f07bd20c5d62bc7a63a
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- desktop-shell/shell.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index b8cd32b..2790a2a 100644
---- a/desktop-shell/shell.c
-+++ b/desktop-shell/shell.c
-@@ -5085,6 +5085,7 @@ struct switcher {
-       struct weston_surface *current;
-       struct wl_listener listener;
-       struct weston_keyboard_grab grab;
-+      struct wl_array minimized_array;
- };
- static void
-@@ -5095,6 +5096,16 @@ switcher_next(struct switcher *switcher)
-       struct shell_surface *shsurf;
-       struct workspace *ws = get_current_workspace(switcher->shell);
-+       /* temporary re-display minimized surfaces */
-+      struct weston_view *tmp;
-+      struct weston_view **minimized;
-+      wl_list_for_each_safe(view, tmp, &switcher->shell->minimized_layer.view_list, layer_link) {
-+              wl_list_remove(&view->layer_link);
-+              wl_list_insert(&ws->layer.view_list, &view->layer_link);
-+              minimized = wl_array_add(&switcher->minimized_array, sizeof *minimized);
-+              *minimized = view;
-+      }
-+
-       wl_list_for_each(view, &ws->layer.view_list, layer_link) {
-               shsurf = get_shell_surface(view->surface);
-               if (shsurf &&
-@@ -5166,6 +5177,19 @@ switcher_destroy(struct switcher *switcher)
-       weston_keyboard_end_grab(keyboard);
-       if (keyboard->input_method_resource)
-               keyboard->grab = &keyboard->input_method_grab;
-+
-+       /* re-hide surfaces that were temporary shown during the switch */
-+      struct weston_view **minimized;
-+      wl_array_for_each(minimized, &switcher->minimized_array) {
-+              /* with the exception of the current selected */
-+              if ((*minimized)->surface != switcher->current) {
-+                      wl_list_remove(&(*minimized)->layer_link);
-+                      wl_list_insert(&switcher->shell->minimized_layer.view_list, &(*minimized)->layer_link);
-+                      weston_view_damage_below(*minimized);
-+              }
-+      }
-+      wl_array_release(&switcher->minimized_array);
-+
-       free(switcher);
- }
-@@ -5218,6 +5242,7 @@ switcher_binding(struct weston_seat *seat, uint32_t time, uint32_t key,
-       switcher->current = NULL;
-       switcher->listener.notify = switcher_handle_surface_destroy;
-       wl_list_init(&switcher->listener.link);
-+      wl_array_init(&switcher->minimized_array);
-       restore_all_output_modes(shell->compositor);
-       lower_fullscreen_layer(switcher->shell);
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0005-toytoolkit-totally-switch-to-xdg-shell-protocol.patch b/recipes-graphics/wayland/weston/0005-toytoolkit-totally-switch-to-xdg-shell-protocol.patch
deleted file mode 100644 (file)
index 612d107..0000000
+++ /dev/null
@@ -1,640 +0,0 @@
-From 12578261ae9027f89ebfcfcc326e2757c253e4a2 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Wed, 26 Feb 2014 17:59:19 +0100
-Subject: [PATCH 05/13] toytoolkit: totally switch to xdg-shell protocol
-
-Totally switch toytoolkit to xdg-shell instead of wl_shell,
-so each state (maximization, minimization...) is correctly
-handled.
-
-Bug-Tizen: TIVI-2792
-Bug: https://bugs.freedesktop.org/show_bug.cgi?id=53214
-
-Change-Id: I68175a8a40709a6558bed9111ce2c61654d21e6a
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- clients/Makefile.am      |   8 +-
- clients/fullscreen.c     |   9 --
- clients/transformed.c    |   2 -
- clients/window.c         | 255 ++++++++++++++++++++++++++---------------------
- clients/window.h         |   3 +
- desktop-shell/shell.c    |  11 +-
- packaging/weston.changes |   6 ++
- 7 files changed, 167 insertions(+), 127 deletions(-)
-
-diff --git a/clients/Makefile.am b/clients/Makefile.am
-index 4f8d4a6..6052503 100644
---- a/clients/Makefile.am
-+++ b/clients/Makefile.am
-@@ -91,7 +91,9 @@ libtoytoolkit_la_SOURCES =                   \
-       scaler-protocol.c                       \
-       scaler-client-protocol.h                \
-       workspaces-protocol.c                   \
--      workspaces-client-protocol.h
-+      workspaces-client-protocol.h            \
-+      xdg-shell-protocol.c                    \
-+      xdg-shell-client-protocol.h
- libtoytoolkit_la_LIBADD =                     \
-       $(CLIENT_LIBS)                          \
-@@ -218,7 +220,9 @@ BUILT_SOURCES =                                    \
-       scaler-client-protocol.h                \
-       scaler-protocol.c                       \
-       workspaces-client-protocol.h            \
--      workspaces-protocol.c
-+      workspaces-protocol.c                   \
-+      xdg-shell-client-protocol.h             \
-+      xdg-shell-protocol.c
- CLEANFILES = $(BUILT_SOURCES)
- endif
-diff --git a/clients/fullscreen.c b/clients/fullscreen.c
-index 034a352..0f49cbb 100644
---- a/clients/fullscreen.c
-+++ b/clients/fullscreen.c
-@@ -222,13 +222,6 @@ key_handler(struct window *window, struct input *input, uint32_t time,
-                                      fullscreen->width, fullscreen->height);
-               break;
--      case XKB_KEY_m:
--              fullscreen->fullscreen_method = (fullscreen->fullscreen_method + 1) % 4;
--              window_set_fullscreen_method(fullscreen->window,
--                                           fullscreen->fullscreen_method);
--              window_schedule_redraw(window);
--              break;
--
-       case XKB_KEY_f:
-               fullscreen->fullscreen ^= 1;
-               window_set_fullscreen(window, fullscreen->fullscreen);
-@@ -338,8 +331,6 @@ int main(int argc, char *argv[])
-               window_add_widget(fullscreen.window, &fullscreen);
-       window_set_title(fullscreen.window, "Fullscreen");
--      window_set_fullscreen_method(fullscreen.window,
--                                   fullscreen.fullscreen_method);
-       widget_set_transparent(fullscreen.widget, 0);
-       widget_set_default_cursor(fullscreen.widget, CURSOR_LEFT_PTR);
-diff --git a/clients/transformed.c b/clients/transformed.c
-index bbc1dc0..e4b55ea 100644
---- a/clients/transformed.c
-+++ b/clients/transformed.c
-@@ -286,8 +286,6 @@ int main(int argc, char *argv[])
-               window_add_widget(transformed.window, &transformed);
-       window_set_title(transformed.window, "Transformed");
--      window_set_fullscreen_method(transformed.window,
--                                   transformed.fullscreen_method);
-       widget_set_transparent(transformed.widget, 0);
-       widget_set_default_cursor(transformed.widget, CURSOR_BLANK);
-diff --git a/clients/window.c b/clients/window.c
-index d8d79d0..c8287e2 100644
---- a/clients/window.c
-+++ b/clients/window.c
-@@ -68,6 +68,7 @@ typedef void *EGLContext;
- #include "text-cursor-position-client-protocol.h"
- #include "workspaces-client-protocol.h"
- #include "../shared/os-compatibility.h"
-+#include "xdg-shell-client-protocol.h"
- #include "window.h"
-@@ -85,11 +86,11 @@ struct display {
-       struct wl_registry *registry;
-       struct wl_compositor *compositor;
-       struct wl_subcompositor *subcompositor;
--      struct wl_shell *shell;
-       struct wl_shm *shm;
-       struct wl_data_device_manager *data_device_manager;
-       struct text_cursor_position *text_cursor_position;
-       struct workspace_manager *workspace_manager;
-+      struct xdg_shell *xdg_shell;
-       EGLDisplay dpy;
-       EGLConfig argb_config;
-       EGLContext argb_ctx;
-@@ -251,7 +252,8 @@ struct window {
-       window_output_handler_t output_handler;
-       struct surface *main_surface;
--      struct wl_shell_surface *shell_surface;
-+      struct xdg_surface *xdg_surface;
-+      struct xdg_popup *xdg_popup;
-       struct window_frame *frame;
-@@ -1375,11 +1377,8 @@ window_flush(struct window *window)
- {
-       struct surface *surface;
--      if (window->type == TYPE_NONE) {
-+      if (window->type == TYPE_NONE)
-               window->type = TYPE_TOPLEVEL;
--              if (window->shell_surface)
--                      wl_shell_surface_set_toplevel(window->shell_surface);
--      }
-       wl_list_for_each(surface, &window->subsurface_list, link) {
-               if (surface == window->main_surface)
-@@ -1552,8 +1551,10 @@ window_destroy(struct window *window)
-       if (window->frame)
-               window_frame_destroy(window->frame);
--      if (window->shell_surface)
--              wl_shell_surface_destroy(window->shell_surface);
-+      if (window->xdg_surface)
-+              xdg_surface_destroy(window->xdg_surface);
-+      if (window->xdg_popup)
-+              xdg_popup_destroy(window->xdg_popup);
-       surface_destroy(window->main_surface);
-@@ -2294,13 +2295,7 @@ frame_menu_func(struct window *window,
-       struct display *display;
-       switch (index) {
--      case 0: /* close */
--              if (window->close_handler)
--                      window->close_handler(window->user_data);
--              else
--                      display_exit(window->display);
--              break;
--      case 1: /* move to workspace above */
-+      case 0: /* move to workspace above */
-               display = window->display;
-               if (display->workspace > 0)
-                       workspace_manager_move_surface(
-@@ -2308,7 +2303,7 @@ frame_menu_func(struct window *window,
-                               window->main_surface->surface,
-                               display->workspace - 1);
-               break;
--      case 2: /* move to workspace below */
-+      case 1: /* move to workspace below */
-               display = window->display;
-               if (display->workspace < display->workspace_count - 1)
-                       workspace_manager_move_surface(
-@@ -2316,7 +2311,7 @@ frame_menu_func(struct window *window,
-                               window->main_surface->surface,
-                               display->workspace + 1);
-               break;
--      case 3: /* fullscreen */
-+      case 2: /* fullscreen */
-               /* we don't have a way to get out of fullscreen for now */
-               if (window->fullscreen_handler)
-                       window->fullscreen_handler(window, window->user_data);
-@@ -2332,7 +2327,6 @@ window_show_frame_menu(struct window *window,
-       int count;
-       static const char *entries[] = {
--              "Close",
-               "Move to workspace above", "Move to workspace below",
-               "Fullscreen"
-       };
-@@ -2398,8 +2392,10 @@ frame_handle_status(struct window_frame *frame, struct input *input,
-       if (status & FRAME_STATUS_REPAINT)
-               widget_schedule_redraw(frame->widget);
--      if (status & FRAME_STATUS_MINIMIZE)
--              fprintf(stderr,"Minimize stub\n");
-+      if (status & FRAME_STATUS_MINIMIZE) {
-+              window_set_minimized(window);
-+              frame_status_clear(frame->frame, FRAME_STATUS_MINIMIZE);
-+      }
-       if (status & FRAME_STATUS_MENU) {
-               window_show_frame_menu(window, input, time);
-@@ -2419,23 +2415,23 @@ frame_handle_status(struct window_frame *frame, struct input *input,
-               return;
-       }
--      if ((status & FRAME_STATUS_MOVE) && window->shell_surface) {
-+      if ((status & FRAME_STATUS_MOVE) && window->xdg_surface) {
-               input_ungrab(input);
--              wl_shell_surface_move(window->shell_surface,
--                                    input_get_seat(input),
--                                    window->display->serial);
-+              xdg_surface_move(window->xdg_surface,
-+                               input_get_seat(input),
-+                               window->display->serial);
-               frame_status_clear(frame->frame, FRAME_STATUS_MOVE);
-       }
--      if ((status & FRAME_STATUS_RESIZE) && window->shell_surface) {
-+      if ((status & FRAME_STATUS_RESIZE) && window->xdg_surface) {
-               input_ungrab(input);
-               window->resizing = 1;
--              wl_shell_surface_resize(window->shell_surface,
--                                      input_get_seat(input),
--                                      window->display->serial,
--                                      location);
-+              xdg_surface_resize(window->xdg_surface,
-+                                 input_get_seat(input),
-+                                 window->display->serial,
-+                                 location);
-               frame_status_clear(frame->frame, FRAME_STATUS_RESIZE);
-       }
-@@ -3668,10 +3664,10 @@ input_receive_selection_data_to_fd(struct input *input,
- void
- window_move(struct window *window, struct input *input, uint32_t serial)
- {
--      if (!window->shell_surface)
-+      if (!window->xdg_surface)
-               return;
--      wl_shell_surface_move(window->shell_surface, input->seat, serial);
-+      xdg_surface_move(window->xdg_surface, input->seat, serial);
- }
- static void
-@@ -3880,15 +3876,15 @@ widget_schedule_resize(struct widget *widget, int32_t width, int32_t height)
- }
- static void
--handle_ping(void *data, struct wl_shell_surface *shell_surface,
--                                                      uint32_t serial)
-+handle_surface_ping(void *data, struct xdg_surface *xdg_surface,
-+                  uint32_t serial)
- {
--      wl_shell_surface_pong(shell_surface, serial);
-+      xdg_surface_pong(xdg_surface, serial);
- }
- static void
--handle_configure(void *data, struct wl_shell_surface *shell_surface,
--               uint32_t edges, int32_t width, int32_t height)
-+handle_surface_configure(void *data, struct xdg_surface *xdg_surface,
-+                       uint32_t edges, int32_t width, int32_t height)
- {
-       struct window *window = data;
-@@ -3897,35 +3893,55 @@ handle_configure(void *data, struct wl_shell_surface *shell_surface,
- }
- static void
--menu_destroy(struct menu *menu)
-+handle_surface_request_set_fullscreen(void *data, struct xdg_surface *xdg_surface)
- {
--      widget_destroy(menu->widget);
--      window_destroy(menu->window);
--      frame_destroy(menu->frame);
--      free(menu);
- }
- static void
--handle_popup_done(void *data, struct wl_shell_surface *shell_surface)
-+handle_surface_request_unset_fullscreen(void *data, struct xdg_surface *xdg_surface)
- {
--      struct window *window = data;
--      struct menu *menu = window->main_surface->widget->user_data;
-+}
--      /* FIXME: Need more context in this event, at least the input
--       * device.  Or just use wl_callback.  And this really needs to
--       * be a window vfunc that the menu can set.  And we need the
--       * time. */
-+static void
-+handle_surface_request_set_maximized(void *data, struct xdg_surface *xdg_surface)
-+{
-+}
--      input_ungrab(menu->input);
--      menu_destroy(menu);
-+static void
-+handle_surface_request_unset_maximized(void *data, struct xdg_surface *xdg_surface)
-+{
-+}
-+
-+static void
-+handle_surface_focused_set(void *data, struct xdg_surface *xdg_surface)
-+{
-+}
-+
-+static void
-+handle_surface_focused_unset(void *data, struct xdg_surface *xdg_surface)
-+{
- }
--static const struct wl_shell_surface_listener shell_surface_listener = {
--      handle_ping,
--      handle_configure,
--      handle_popup_done
-+static const struct xdg_surface_listener xdg_surface_listener = {
-+      handle_surface_ping,
-+      handle_surface_configure,
-+      handle_surface_request_set_fullscreen,
-+      handle_surface_request_unset_fullscreen,
-+      handle_surface_request_set_maximized,
-+      handle_surface_request_unset_maximized,
-+      handle_surface_focused_set,
-+      handle_surface_focused_unset
- };
-+static void
-+menu_destroy(struct menu *menu)
-+{
-+      widget_destroy(menu->widget);
-+      window_destroy(menu->window);
-+      frame_destroy(menu->frame);
-+      free(menu);
-+}
-+
- void
- window_get_allocation(struct window *window,
-                     struct rectangle *allocation)
-@@ -4125,7 +4141,7 @@ window_defer_redraw_until_configure(struct window* window)
- void
- window_set_fullscreen(struct window *window, int fullscreen)
- {
--      if (!window->display->shell)
-+      if (!window->xdg_surface)
-               return;
-       if ((window->type == TYPE_FULLSCREEN) == fullscreen)
-@@ -4133,35 +4149,20 @@ window_set_fullscreen(struct window *window, int fullscreen)
-       if (fullscreen) {
-               window->saved_type = window->type;
--              if (window->type == TYPE_TOPLEVEL) {
--                      window->saved_allocation = window->main_surface->allocation;
--              }
-               window->type = TYPE_FULLSCREEN;
--              wl_shell_surface_set_fullscreen(window->shell_surface,
--                                              window->fullscreen_method,
--                                              0, NULL);
-+              xdg_surface_set_fullscreen(window->xdg_surface);
-               window_defer_redraw_until_configure (window);
-       } else {
-               if (window->saved_type == TYPE_MAXIMIZED) {
-                       window_set_maximized(window, 1);
-               } else {
-                       window->type = TYPE_TOPLEVEL;
--                      wl_shell_surface_set_toplevel(window->shell_surface);
--                      window_schedule_resize(window,
--                                                 window->saved_allocation.width,
--                                                 window->saved_allocation.height);
-+                      xdg_surface_unset_fullscreen(window->xdg_surface);
-               }
-       }
- }
--void
--window_set_fullscreen_method(struct window *window,
--                           enum wl_shell_surface_fullscreen_method method)
--{
--      window->fullscreen_method = method;
--}
--
- int
- window_is_maximized(struct window *window)
- {
-@@ -4171,31 +4172,34 @@ window_is_maximized(struct window *window)
- void
- window_set_maximized(struct window *window, int maximized)
- {
--      if (!window->display->shell)
-+      if (!window->xdg_surface)
-               return;
-       if ((window->type == TYPE_MAXIMIZED) == maximized)
-               return;
-       if (window->type == TYPE_TOPLEVEL) {
--              window->saved_allocation = window->main_surface->allocation;
--              wl_shell_surface_set_maximized(window->shell_surface, NULL);
--              window->type = TYPE_MAXIMIZED;
--              window_defer_redraw_until_configure(window);
--      } else if (window->type == TYPE_FULLSCREEN) {
--              wl_shell_surface_set_maximized(window->shell_surface, NULL);
-+              xdg_surface_set_maximized(window->xdg_surface);
-               window->type = TYPE_MAXIMIZED;
-               window_defer_redraw_until_configure(window);
--      } else {
--              wl_shell_surface_set_toplevel(window->shell_surface);
-+      } else if (window->type == TYPE_MAXIMIZED) {
-+              xdg_surface_unset_maximized(window->xdg_surface);
-               window->type = TYPE_TOPLEVEL;
--              window_schedule_resize(window,
--                                     window->saved_allocation.width,
--                                     window->saved_allocation.height);
-+              window_defer_redraw_until_configure(window);
-       }
- }
- void
-+window_set_minimized(struct window *window)
-+{
-+      if (!window->xdg_surface)
-+              return;
-+
-+      xdg_surface_set_minimized(window->xdg_surface);
-+      window_defer_redraw_until_configure(window);
-+}
-+
-+void
- window_set_user_data(struct window *window, void *data)
- {
-       window->user_data = data;
-@@ -4263,8 +4267,8 @@ window_set_title(struct window *window, const char *title)
-               frame_set_title(window->frame->frame, title);
-               widget_schedule_redraw(window->frame->widget);
-       }
--      if (window->shell_surface)
--              wl_shell_surface_set_title(window->shell_surface, title);
-+      if (window->xdg_surface)
-+              xdg_surface_set_title(window->xdg_surface, title);
- }
- const char *
-@@ -4389,11 +4393,11 @@ window_create_internal(struct display *display, int type)
-       surface = surface_create(window);
-       window->main_surface = surface;
--      if (type != TYPE_CUSTOM && display->shell) {
--              window->shell_surface =
--                      wl_shell_get_shell_surface(display->shell,
--                                                 surface->surface);
--              fail_on_null(window->shell_surface);
-+      if (type != TYPE_CUSTOM && type != TYPE_MENU && display->xdg_shell) {
-+              window->xdg_surface =
-+                      xdg_shell_get_xdg_surface(display->xdg_shell,
-+                                                surface->surface);
-+              fail_on_null(window->xdg_surface);
-       }
-       window->type = type;
-@@ -4414,10 +4418,10 @@ window_create_internal(struct display *display, int type)
-       wl_list_insert(display->window_list.prev, &window->link);
-       wl_list_init(&window->redraw_task.link);
--      if (window->shell_surface) {
--              wl_shell_surface_set_user_data(window->shell_surface, window);
--              wl_shell_surface_add_listener(window->shell_surface,
--                                            &shell_surface_listener, window);
-+      if (window->xdg_surface) {
-+              xdg_surface_set_user_data(window->xdg_surface, window);
-+              xdg_surface_add_listener(window->xdg_surface,
-+                                       &xdg_surface_listener, window);
-       }
-       wl_list_init (&window->window_output_list);
-@@ -4445,14 +4449,10 @@ window_create_transient(struct display *display, struct window *parent,
-       window = window_create_internal(parent->display, TYPE_TRANSIENT);
--      window->x = x;
--      window->y = y;
--
--      if (display->shell)
--              wl_shell_surface_set_transient(
--                      window->shell_surface,
--                      parent->main_surface->surface,
--                      window->x, window->y, flags);
-+      if (display->xdg_shell)
-+              xdg_surface_set_transient_for(
-+                      window->xdg_surface,
-+                      parent->main_surface->surface);
-       return window;
- }
-@@ -4567,6 +4567,27 @@ menu_redraw_handler(struct widget *widget, void *data)
-       cairo_destroy(cr);
- }
-+static void
-+handle_popup_ping(void *data, struct xdg_popup *xdg_popup, uint32_t serial)
-+{
-+      xdg_popup_pong(xdg_popup, serial);
-+}
-+
-+static void
-+handle_popup_popup_done(void *data, struct xdg_popup *xdg_popup, uint32_t serial)
-+{
-+      struct window *window = data;
-+      struct menu *menu = window->main_surface->widget->user_data;
-+
-+      input_ungrab(menu->input);
-+      menu_destroy(menu);
-+}
-+
-+static const struct xdg_popup_listener xdg_popup_listener = {
-+      handle_popup_ping,
-+      handle_popup_popup_done
-+};
-+
- void
- window_show_menu(struct display *display,
-                struct input *input, uint32_t time, struct window *parent,
-@@ -4621,10 +4642,19 @@ window_show_menu(struct display *display,
-                              frame_height(menu->frame));
-       frame_interior(menu->frame, &ix, &iy, NULL, NULL);
--      wl_shell_surface_set_popup(window->shell_surface, input->seat,
--                                 display_get_serial(window->display),
--                                 parent->main_surface->surface,
--                                 window->x - ix, window->y - iy, 0);
-+      window->xdg_popup = xdg_shell_get_xdg_popup(display->xdg_shell,
-+                                                  window->main_surface->surface,
-+                                                  parent->main_surface->surface,
-+                                                  input->seat,
-+                                                  display_get_serial(window->display),
-+                                                  window->x - ix,
-+                                                  window->y - iy,
-+                                                  0);
-+      fail_on_null(window->xdg_popup);
-+
-+      xdg_popup_set_user_data(window->xdg_popup, window);
-+      xdg_popup_add_listener(window->xdg_popup,
-+                             &xdg_popup_listener, window);
- }
- void
-@@ -4996,9 +5026,10 @@ registry_handle_global(void *data, struct wl_registry *registry, uint32_t id,
-       } else if (strcmp(interface, "wl_seat") == 0) {
-               d->seat_version = version;
-               display_add_input(d, id);
--      } else if (strcmp(interface, "wl_shell") == 0) {
--              d->shell = wl_registry_bind(registry,
--                                          id, &wl_shell_interface, 1);
-+      } else if (strcmp(interface, "xdg_shell") == 0) {
-+              d->xdg_shell = wl_registry_bind(registry,
-+                                          id, &xdg_shell_interface, 1);
-+              xdg_shell_use_unstable_version(d->xdg_shell, XDG_SHELL_VERSION_CURRENT);
-       } else if (strcmp(interface, "wl_shm") == 0) {
-               d->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1);
-               wl_shm_add_listener(d->shm, &shm_listener, d);
-@@ -5312,8 +5343,8 @@ display_destroy(struct display *display)
-       if (display->subcompositor)
-               wl_subcompositor_destroy(display->subcompositor);
--      if (display->shell)
--              wl_shell_destroy(display->shell);
-+      if (display->xdg_shell)
-+              xdg_shell_destroy(display->xdg_shell);
-       if (display->shm)
-               wl_shm_destroy(display->shm);
-diff --git a/clients/window.h b/clients/window.h
-index dec133f..54b848b 100644
---- a/clients/window.h
-+++ b/clients/window.h
-@@ -381,6 +381,9 @@ void
- window_set_maximized(struct window *window, int maximized);
- void
-+window_set_minimized(struct window *window);
-+
-+void
- window_set_user_data(struct window *window, void *data);
- void *
-diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index 2790a2a..962dde0 100644
---- a/desktop-shell/shell.c
-+++ b/desktop-shell/shell.c
-@@ -2492,7 +2492,7 @@ set_surface_type(struct shell_surface *shsurf)
-       switch (shsurf->type) {
-       case SHELL_SURFACE_TOPLEVEL:
--              if (shsurf->state.maximized || shsurf->state.fullscreen) {
-+              if (shsurf->state.fullscreen) {
-                       set_full_output(shsurf);
-               } else if (shsurf->state.relative && pev) {
-                       weston_view_set_position(shsurf->view,
-@@ -3266,8 +3266,15 @@ xdg_surface_set_maximized(struct wl_client *client,
-       if (shsurf->type != SHELL_SURFACE_TOPLEVEL)
-               return;
--      if (!shsurf->next_state.maximized)
-+      if (!shsurf->next_state.maximized) {
-+              shsurf->saved_x = shsurf->view->geometry.x;
-+              shsurf->saved_y = shsurf->view->geometry.y;
-+              shsurf->saved_width = shsurf->surface->width;
-+              shsurf->saved_height = shsurf->surface->height;
-+              shsurf->saved_size_valid = true;
-+              shsurf->saved_position_valid = true;
-               set_maximized(shsurf, NULL);
-+      }
- }
- static void
-diff --git a/packaging/weston.changes b/packaging/weston.changes
-index e2beff6..6a35d43 100644
---- a/packaging/weston.changes
-+++ b/packaging/weston.changes
-@@ -1,3 +1,9 @@
-+* Wed Mar 05 2014 Ossama Othman <ossama.othman@intel.com> accepted/tizen/mobile/20140227.071827@0aaa2e4
-+- toytoolkit: totally switch to xdg-shell protocol
-+- compositor: use Mod-Tab to show/raise minimized surfaces
-+- compositor: implement xdg_surface_set_minimized()
-+- This vfunc lets us read out a rectangle of pixels from the currently attached surface buffer.
-+
- * Wed Feb 12 2014 Ossama Othman <ossama.othman@intel.com> 1.4.0@d601bc0
- - Update to 1.4.0
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0006-packaging-add-weston-editor-weston-subsurfaces-clien.patch b/recipes-graphics/wayland/weston/0006-packaging-add-weston-editor-weston-subsurfaces-clien.patch
deleted file mode 100644 (file)
index 4c3e2c9..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From c4be9bb5d281a7dad9fc409cde43cab349a369b0 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Thu, 6 Mar 2014 12:22:25 +0100
-Subject: [PATCH 06/13] packaging: add weston-editor & weston-subsurfaces
- clients.
-
-The editor client has virtual keyboard API, and subsurfaces
-the new subsurfaces API.
-
-Change-Id: I41bb14bb673a1c3bf9d6b063ec038885e9d94621
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- packaging/weston.spec | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/packaging/weston.spec b/packaging/weston.spec
-index 84d2cb8..aeb57af 100644
---- a/packaging/weston.spec
-+++ b/packaging/weston.spec
-@@ -40,6 +40,7 @@ BuildRequires:  pkgconfig(libffi)
- BuildRequires:  pkgconfig(libsystemd-login)
- BuildRequires:  pkgconfig(libudev) >= 136
- BuildRequires:  pkgconfig(mtdev) >= 1.1.0
-+BuildRequires:  pkgconfig(pangocairo)
- BuildRequires:  pkgconfig(pixman-1)
- BuildRequires:  pkgconfig(poppler-glib)
- BuildRequires:  pkgconfig(wayland-client)
-@@ -101,10 +102,12 @@ install -m 755 clients/weston-flower %{buildroot}%{_bindir}
- install -m 755 clients/weston-image %{buildroot}%{_bindir}
- install -m 755 clients/weston-cliptest %{buildroot}%{_bindir}
- install -m 755 clients/weston-dnd %{buildroot}%{_bindir}
-+install -m 755 clients/weston-editor %{buildroot}%{_bindir}
- install -m 755 clients/weston-smoke %{buildroot}%{_bindir}
- install -m 755 clients/weston-resizor %{buildroot}%{_bindir}
- install -m 755 clients/weston-eventdemo %{buildroot}%{_bindir}
- install -m 755 clients/weston-clickdot %{buildroot}%{_bindir}
-+install -m 755 clients/weston-subsurfaces %{buildroot}%{_bindir}
- install -m 755 clients/weston-transformed %{buildroot}%{_bindir}
- install -m 755 clients/weston-fullscreen %{buildroot}%{_bindir}
- install -m 755 clients/weston-calibrator %{buildroot}%{_bindir}
-@@ -153,10 +156,12 @@ getent group weston-launch >/dev/null || %{_sbindir}/groupadd -o -r weston-launc
- %_bindir/weston-image
- %_bindir/weston-cliptest
- %_bindir/weston-dnd
-+%_bindir/weston-editor
- %_bindir/weston-smoke
- %_bindir/weston-resizor
- %_bindir/weston-eventdemo
- %_bindir/weston-clickdot
-+%_bindir/weston-subsurfaces
- %_bindir/weston-transformed
- %_bindir/weston-fullscreen
- %_bindir/weston-calibrator
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0007-shell-position-input-panel-layer-above-fullscreen-la.patch b/recipes-graphics/wayland/weston/0007-shell-position-input-panel-layer-above-fullscreen-la.patch
deleted file mode 100644 (file)
index fc71812..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-From d74310237df6e88f6978f5b57b3924e8b4514f37 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Fri, 7 Mar 2014 17:49:07 +0100
-Subject: [PATCH 07/13] shell: position input panel layer above fullscreen
- layer
-
-When a client calls the input panel (weston-keyboard e.g.)
-and then goes fullscreen, the panel will not be hidden
-anymore.
-
-Bug-Tizen: TIVI-2228
-Origin: http://lists.freedesktop.org/archives/wayland-devel/2014-March/013523.html
-
-Change-Id: Ia8bb924a824e1356c28b4bcaf34a7697be6e59c2
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- desktop-shell/input-panel.c |  2 +-
- desktop-shell/shell.c       | 17 +++++++++--------
- packaging/weston.changes    |  4 ++++
- 3 files changed, 14 insertions(+), 9 deletions(-)
-
-diff --git a/desktop-shell/input-panel.c b/desktop-shell/input-panel.c
-index c08a403..12fe686 100644
---- a/desktop-shell/input-panel.c
-+++ b/desktop-shell/input-panel.c
-@@ -63,7 +63,7 @@ show_input_panels(struct wl_listener *listener, void *data)
-       shell->showing_input_panels = true;
-       if (!shell->locked)
--              wl_list_insert(&shell->panel_layer.link,
-+              wl_list_insert(&shell->compositor->cursor_layer.link,
-                              &shell->input_panel_layer.link);
-       wl_list_for_each_safe(ipsurf, next,
-diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
-index 962dde0..8cd4401 100644
---- a/desktop-shell/shell.c
-+++ b/desktop-shell/shell.c
-@@ -84,9 +84,9 @@ struct ping_timer {
-  * in the following order (top-most first):
-  *  • Lock layer (only ever displayed on its own)
-  *  • Cursor layer
-+ *  • Input panel layer
-  *  • Fullscreen layer
-  *  • Panel layer
-- *  • Input panel layer
-  *  • Workspace layers
-  *  • Background layer
-  *
-@@ -3800,18 +3800,19 @@ resume_desktop(struct desktop_shell *shell)
-       terminate_screensaver(shell);
-       wl_list_remove(&shell->lock_layer.link);
--      wl_list_insert(&shell->compositor->cursor_layer.link,
--                     &shell->fullscreen_layer.link);
--      wl_list_insert(&shell->fullscreen_layer.link,
--                     &shell->panel_layer.link);
-       if (shell->showing_input_panels) {
--              wl_list_insert(&shell->panel_layer.link,
-+              wl_list_insert(&shell->compositor->cursor_layer.link,
-                              &shell->input_panel_layer.link);
-               wl_list_insert(&shell->input_panel_layer.link,
--                             &ws->layer.link);
-+                             &shell->fullscreen_layer.link);
-       } else {
--              wl_list_insert(&shell->panel_layer.link, &ws->layer.link);
-+              wl_list_insert(&shell->compositor->cursor_layer.link,
-+                             &shell->fullscreen_layer.link);
-       }
-+      wl_list_insert(&shell->fullscreen_layer.link,
-+                     &shell->panel_layer.link);
-+      wl_list_insert(&shell->panel_layer.link,
-+                     &ws->layer.link),
-       restore_focus_state(shell, get_current_workspace(shell));
-diff --git a/packaging/weston.changes b/packaging/weston.changes
-index 6a35d43..df6408d 100644
---- a/packaging/weston.changes
-+++ b/packaging/weston.changes
-@@ -1,3 +1,7 @@
-+* Fri Mar 07 2014 Ossama Othman <ossama.othman@intel.com> accepted/tizen/mobile/20140306.215156@0a8cc4e
-+- shell: position input panel layer above fullscreen layer
-+- packaging: add weston-editor & weston-subsurfaces clients.
-+
- * Wed Mar 05 2014 Ossama Othman <ossama.othman@intel.com> accepted/tizen/mobile/20140227.071827@0aaa2e4
- - toytoolkit: totally switch to xdg-shell protocol
- - compositor: use Mod-Tab to show/raise minimized surfaces
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0008-packaging-add-the-RDP-backend.patch b/recipes-graphics/wayland/weston/0008-packaging-add-the-RDP-backend.patch
deleted file mode 100644 (file)
index 29b86f9..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-From a6ac09dd1cc5b7547ff75fbe993f878aeb8920b4 Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Wed, 14 May 2014 13:32:38 +0200
-Subject: [PATCH 08/13] packaging: add the RDP backend
-
-As we now have FreeRDP (platform/upstream/freerdp), we are
-able to ship the RDP backend -which provides a remote
-display feature- in an additionnal package.
-
-Change-Id: Iaefb801ff4cf65060546fedebaff6aecf5263507
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- packaging/weston-rdp.spec | 64 +++++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
- create mode 100644 packaging/weston-rdp.spec
-
-diff --git a/packaging/weston-rdp.spec b/packaging/weston-rdp.spec
-new file mode 100644
-index 0000000..ad5993c
---- /dev/null
-+++ b/packaging/weston-rdp.spec
-@@ -0,0 +1,64 @@
-+%bcond_with wayland
-+
-+Name:           weston-rdp
-+Version:        1.4.0
-+Release:        0
-+Summary:      RDP compositor for Weston
-+License:        MIT
-+Group:          Graphics & UI Framework/Wayland Window System
-+Url:            http://weston.freedesktop.org/
-+
-+#Git-Clone:   git://anongit.freedesktop.org/wayland/weston
-+#Git-Web:     http://cgit.freedesktop.org/wayland/weston/
-+Source0:         %name-%version.tar.xz
-+Source1:      weston-rdp.manifest
-+BuildRequires:        autoconf >= 2.64, automake >= 1.11
-+BuildRequires:  expat-devel
-+BuildRequires:  libjpeg-devel
-+BuildRequires:  libtool >= 2.2
-+BuildRequires:  pkgconfig
-+BuildRequires:  xz
-+BuildRequires:  pkgconfig(cairo)
-+BuildRequires:  pkgconfig(freerdp)
-+BuildRequires:  pkgconfig(gio-2.0)
-+BuildRequires:  pkgconfig(glib-2.0)
-+BuildRequires:  pkgconfig(gobject-2.0)
-+BuildRequires:  pkgconfig(pixman-1)
-+BuildRequires:  pkgconfig(wayland-client)
-+BuildRequires:  pkgconfig(wayland-server)
-+BuildRequires:  pkgconfig(xkbcommon) >= 0.3.0
-+Requires:       weston
-+
-+%if !%{with wayland}
-+ExclusiveArch:
-+%endif
-+
-+
-+%description
-+This package provides a RDP compositor allowing to do remote rendering
-+through the network.
-+
-+%prep
-+%setup -q
-+cp %{SOURCE1} .
-+
-+%build
-+%autogen --disable-static --disable-setuid-install --disable-weston-launch --disable-simple-clients --with-cairo=image --disable-egl --disable-clients --disable-libunwind --disable-xwayland --disable-xwayland-test --disable-x11-compositor --disable-drm-compositor --disable-fbdev-compositor --disable-headless-compositor --disable-wayland-compositor --disable-rpi-compositor --enable-rdp-compositor %{?extra_config_options:%extra_config_options}
-+make %{?_smp_mflags}
-+
-+%install
-+%make_install
-+
-+%files
-+%manifest %{name}.manifest
-+%defattr(-,root,root)
-+%license COPYING
-+%_libdir/weston/rdp-backend.so
-+%exclude %_bindir
-+%exclude %_includedir
-+%exclude %_prefix/lib/debug
-+%exclude %_libdir/pkgconfig
-+%exclude %_libdir/weston/desktop-shell.so
-+%exclude %_datadir
-+
-+%changelog
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0009-packaging-fix-the-RDP-backend-build.patch b/recipes-graphics/wayland/weston/0009-packaging-fix-the-RDP-backend-build.patch
deleted file mode 100644 (file)
index 3dd4f81..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-From ea380956ee45d68bf1c13c73843f1f07e693960e Mon Sep 17 00:00:00 2001
-From: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-Date: Tue, 20 May 2014 13:49:34 +0200
-Subject: [PATCH 09/13] packaging: fix the RDP backend build
-
-Add manifest file, correct small typos.
-
-Change-Id: I3d1e088ed2aca9b64a9dd9b24d9e5296d38c0bdb
-Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
----
- packaging/weston-rdp.manifest | 5 +++++
- packaging/weston-rdp.spec     | 4 ++--
- 2 files changed, 7 insertions(+), 2 deletions(-)
- create mode 100644 packaging/weston-rdp.manifest
-
-diff --git a/packaging/weston-rdp.manifest b/packaging/weston-rdp.manifest
-new file mode 100644
-index 0000000..017d22d
---- /dev/null
-+++ b/packaging/weston-rdp.manifest
-@@ -0,0 +1,5 @@
-+<manifest>
-+ <request>
-+    <domain name="_"/>
-+ </request>
-+</manifest>
-diff --git a/packaging/weston-rdp.spec b/packaging/weston-rdp.spec
-index ad5993c..a3c2a32 100644
---- a/packaging/weston-rdp.spec
-+++ b/packaging/weston-rdp.spec
-@@ -3,14 +3,14 @@
- Name:           weston-rdp
- Version:        1.4.0
- Release:        0
--Summary:      RDP compositor for Weston
-+Summary:        RDP compositor for Weston
- License:        MIT
- Group:          Graphics & UI Framework/Wayland Window System
- Url:            http://weston.freedesktop.org/
- #Git-Clone:   git://anongit.freedesktop.org/wayland/weston
- #Git-Web:     http://cgit.freedesktop.org/wayland/weston/
--Source0:         %name-%version.tar.xz
-+Source0:         weston-%version.tar.xz
- Source1:      weston-rdp.manifest
- BuildRequires:        autoconf >= 2.64, automake >= 1.11
- BuildRequires:  expat-devel
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0010-packaging-fix-obs-build.patch b/recipes-graphics/wayland/weston/0010-packaging-fix-obs-build.patch
deleted file mode 100644 (file)
index a6294f1..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-From 4b6ce5843ab0836d4f7b3300811cbc7c3afeff28 Mon Sep 17 00:00:00 2001
-From: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-Date: Tue, 20 May 2014 16:03:48 +0200
-Subject: [PATCH 10/13] packaging: fix obs build
-
-Change-Id: Ie934cee0017e1251db9fe4cc73c9d82c070fb126
-Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
----
- packaging/weston-rdp.spec | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/packaging/weston-rdp.spec b/packaging/weston-rdp.spec
-index a3c2a32..abe1801 100644
---- a/packaging/weston-rdp.spec
-+++ b/packaging/weston-rdp.spec
-@@ -39,7 +39,7 @@ This package provides a RDP compositor allowing to do remote rendering
- through the network.
- %prep
--%setup -q
-+%setup -q -n weston-%{version}
- cp %{SOURCE1} .
- %build
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston/0013-allow-to-start-weston-with-system-user.patch b/recipes-graphics/wayland/weston/0013-allow-to-start-weston-with-system-user.patch
deleted file mode 100644 (file)
index 2a45ed3..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5ac9c3048611cc8afcfc54c85f5618a562c8f0ec Mon Sep 17 00:00:00 2001
-From: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
-Date: Mon, 14 Apr 2014 20:44:40 +0200
-Subject: [PATCH 13/13] allow to start weston with system user
-
-the check to allow only root user had been replaced
-by a check to see if effective uid is equal or less than 499
-
-499 is the actual value in login.defs for SYS_UID_MAX
-
-Change-Id: Ic2b96661df0c939e7f6e066f0bed1d8f7e26bd8f
-Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
----
- src/launcher-util.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/launcher-util.c b/src/launcher-util.c
-index 1b63458..47d6eda 100644
---- a/src/launcher-util.c
-+++ b/src/launcher-util.c
-@@ -160,7 +160,7 @@ weston_launcher_open(struct weston_launcher *launcher,
-       msg.msg_iovlen = 1;
-       msg.msg_control = control;
-       msg.msg_controllen = sizeof control;
--      
-+
-       do {
-               len = recvmsg(launcher->fd, &msg, MSG_CMSG_CLOEXEC);
-       } while (len < 0 && errno == EINTR);
-@@ -404,7 +404,7 @@ weston_launcher_connect(struct weston_compositor *compositor, int tty,
-                                         seat_id, tty);
-               if (r < 0) {
-                       launcher->logind = NULL;
--                      if (geteuid() == 0) {
-+                      if (geteuid() <= 499) { /* 499 = SYS_UID_MAX in login.defs, but it should be parsed */
-                               if (setup_tty(launcher, tty) == -1) {
-                                       free(launcher);
-                                       return NULL;
--- 
-1.8.1.4
-
diff --git a/recipes-graphics/wayland/weston_1.4.0.bbappend b/recipes-graphics/wayland/weston_1.4.0.bbappend
deleted file mode 100644 (file)
index a8667cb..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/weston"
-
-SRC_URI += "file://weston.target \
-            file://0001-Update-to-1.4.0.patch \
-            file://0002-This-vfunc-lets-us-read-out-a-rectangle-of-pixels-fr.patch \
-            file://0003-compositor-implement-xdg_surface_set_minimized.patch \
-            file://0004-compositor-use-Mod-Tab-to-show-raise-minimized-surfa.patch \
-            file://0005-toytoolkit-totally-switch-to-xdg-shell-protocol.patch \
-            file://0006-packaging-add-weston-editor-weston-subsurfaces-clien.patch \
-            file://0007-shell-position-input-panel-layer-above-fullscreen-la.patch \
-            file://0008-packaging-add-the-RDP-backend.patch \
-            file://0009-packaging-fix-the-RDP-backend-build.patch \
-            file://0010-packaging-fix-obs-build.patch \
-            file://0011-shell-make-panel-optional-panel-false-in-weston.ini.patch \
-            file://0012-shell-1.4.0-Hack-to-allow-selecting-a-default-output.patch \
-            file://0013-allow-to-start-weston-with-system-user.patch \
-            "
-
-do_install_append() {
-    install -d ${D}/usr/lib/systemd/user
-    install -m 644 ${WORKDIR}/weston.target ${D}/usr/lib/systemd/user/weston.target
-}
-
-FILES_${PN} += " ${prefix}/lib/systemd/user/weston.target"
\ No newline at end of file
diff --git a/recipes-graphics/wayland/weston_1.5.0.bbappend b/recipes-graphics/wayland/weston_1.5.0.bbappend
new file mode 100644 (file)
index 0000000..8bed922
--- /dev/null
@@ -0,0 +1,14 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/weston"
+
+SRC_URI += "file://weston.target \
+            file://0001-downstream-allow-to-start-for-system-users.patch \
+            file://0002-downstream-shell-make-panel-optional-panel-false-in-.patch \
+            file://0003-downstream-Hack-to-allow-selecting-a-default-output.patch \
+            "
+
+do_install_append() {
+    install -d ${D}/usr/lib/systemd/user
+    install -m 644 ${WORKDIR}/weston.target ${D}/usr/lib/systemd/user/weston.target
+}
+
+FILES_${PN} += " ${prefix}/lib/systemd/user/weston.target"
\ No newline at end of file