[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

weston: Changes to 'upstream-unstable'



 .gitignore                          |   14 
 Makefile.am                         |  163 +
 clients/dnd.c                       |   93 -
 clients/editor.c                    |   12 
 clients/ivi-shell-user-interface.c  | 1310 +++++++++++++++
 clients/presentation-shm.c          |  870 ++++++++++
 clients/simple-egl.c                |   95 +
 clients/simple-shm.c                |   82 
 clients/smoke.c                     |   32 
 clients/subsurfaces.c               |    3 
 clients/weston-info.c               |   81 
 clients/window.c                    |  111 +
 configure.ac                        |   36 
 data/COPYING                        |   28 
 data/background.png                 |binary
 data/fullscreen.png                 |binary
 data/home.png                       |binary
 data/icon_ivi_clickdot.png          |binary
 data/icon_ivi_flower.png            |binary
 data/icon_ivi_simple-egl.png        |binary
 data/icon_ivi_simple-shm.png        |binary
 data/icon_ivi_smoke.png             |binary
 data/panel.png                      |binary
 data/random.png                     |binary
 data/sidebyside.png                 |binary
 data/tiling.png                     |binary
 desktop-shell/input-panel.c         |   10 
 desktop-shell/shell.c               |  293 ++-
 fullscreen-shell/fullscreen-shell.c |   13 
 ivi-shell/.gitignore                |    1 
 ivi-shell/README                    |   79 
 ivi-shell/hmi-controller.c          | 1737 +++++++++++++++++++++
 ivi-shell/input-panel-ivi.c         |  391 ++++
 ivi-shell/ivi-layout-export.h       |  777 +++++++++
 ivi-shell/ivi-layout-private.h      |  226 ++
 ivi-shell/ivi-layout-transition.c   |  859 ++++++++++
 ivi-shell/ivi-layout.c              | 2970 ++++++++++++++++++++++++++++++++++++
 ivi-shell/ivi-shell.c               |  429 +++++
 ivi-shell/ivi-shell.h               |   62 
 ivi-shell/weston.ini.in             |   96 +
 man/weston.ini.man                  |   27 
 protocol/fullscreen-shell.xml       |   10 
 protocol/input-method.xml           |    8 
 protocol/ivi-application.xml        |   99 +
 protocol/ivi-hmi-controller.xml     |   97 +
 protocol/presentation_timing.xml    |  276 +++
 protocol/text.xml                   |    2 
 protocol/xdg-shell.xml              |    9 
 releasing.txt                       |   66 
 shared/cairo-util.c                 |  141 +
 shared/cairo-util.h                 |   11 
 shared/frame.c                      |   49 
 src/bindings.c                      |   52 
 src/clipboard.c                     |    6 
 src/cms-colord.c                    |   22 
 src/cms-helper.c                    |    2 
 src/compositor-drm.c                |  162 +
 src/compositor-fbdev.c              |   36 
 src/compositor-headless.c           |   91 -
 src/compositor-rdp.c                |   19 
 src/compositor-rpi.c                |  110 -
 src/compositor-wayland.c            |   37 
 src/compositor-x11.c                |  100 -
 src/compositor.c                    |  767 +++++++--
 src/compositor.h                    |   95 -
 src/data-device.c                   |   48 
 src/evdev-touchpad.c                |  800 ---------
 src/evdev.c                         |  755 ---------
 src/evdev.h                         |  137 -
 src/filter.c                        |  337 ----
 src/filter.h                        |   66 
 src/gl-renderer.c                   |   96 -
 src/input.c                         |   65 
 src/launcher-util.c                 |   22 
 src/launcher-util.h                 |    2 
 src/libinput-device.c               |   85 -
 src/logind-util.c                   |   94 -
 src/logind-util.h                   |    4 
 src/pixman-renderer.c               |   11 
 src/rpi-renderer.c                  |   20 
 src/screenshooter.c                 |   35 
 src/text-backend.c                  |   54 
 src/timeline-object.h               |   52 
 src/timeline.c                      |  294 +++
 src/timeline.h                      |   62 
 src/udev-input.h                    |   34 
 src/udev-seat.c                     |  417 -----
 src/udev-seat.h                     |   57 
 src/vaapi-recorder.c                |    4 
 src/weston-egl-ext.h                |   28 
 src/weston-launch.c                 |   11 
 src/weston.desktop                  |    5 
 src/zoom.c                          |    3 
 tests/bad-buffer-test.c             |    3 
 tests/buffer-count-test.c           |   10 
 tests/button-test.c                 |    1 
 tests/event-test.c                  |    2 
 tests/keyboard-test.c               |    2 
 tests/presentation-test.c           |  238 ++
 tests/roles-test.c                  |  139 +
 tests/setbacklight.c                |    2 
 tests/subsurface-test.c             |    2 
 tests/surface-test.c                |    3 
 tests/text-test.c                   |    2 
 tests/vertex-clip-test.c            |    3 
 tests/weston-test-client-helper.c   |   17 
 tests/weston-test-client-helper.h   |   13 
 tests/weston-test-runner.c          |   11 
 tests/weston-test-runner.h          |    4 
 tests/weston-test.c                 |    3 
 tests/weston-tests-env              |    1 
 tests/xwayland-test.c               |  173 --
 xwayland/selection.c                |    7 
 xwayland/window-manager.c           |  170 +-
 xwayland/xwayland.h                 |    3 
 115 files changed, 13908 insertions(+), 3666 deletions(-)

New commits:
commit dbd8606a2a9425605102db9e722289934ab7b8b4
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Fri Feb 13 20:47:09 2015 -0800

    configure.ac: bump to version 1.7.0 for release

diff --git a/configure.ac b/configure.ac
index e5f395f..b722441 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version], [1])
-m4_define([weston_minor_version], [6])
-m4_define([weston_micro_version], [93])
+m4_define([weston_minor_version], [7])
+m4_define([weston_micro_version], [0])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 
@@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
 
-COMPOSITOR_MODULES="wayland-server >= 1.6.93 pixman-1 >= 0.25.2"
+COMPOSITOR_MODULES="wayland-server >= 1.7.0 pixman-1 >= 0.25.2"
 
 AC_ARG_ENABLE(egl, [  --disable-egl],,
               enable_egl=yes)
@@ -292,7 +292,7 @@ AC_SUBST(JPEG_LIBS)
 
 PKG_CHECK_MODULES(CAIRO, [cairo])
 
-PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.93])
+PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.7.0])
 
 AC_ARG_ENABLE(simple-clients,
               AS_HELP_STRING([--disable-simple-clients],

commit 8a88cec7d4f01ea0698f3a4f19ae266d1526a13a
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Fri Feb 13 20:46:41 2015 -0800

    releasing: Note that Xwayland installation required only for Weston releases

diff --git a/releasing.txt b/releasing.txt
index 4ea210b..8188ddf 100644
--- a/releasing.txt
+++ b/releasing.txt
@@ -15,10 +15,10 @@ To make a release of Weston and/or Wayland, follow these steps.
       $ git commit configure.ac -m "configure.ac: bump to version x.y.z for the xxx release"
       $ git push
 
-  2.  Install Xwayland, either from your distro or manually (see
-      http://wayland.freedesktop.org/building.html).  If you install it
-      to a location other than /usr/bin/Xwayland, specify this in the
-      following env var:
+  2.  For Weston releases, install Xwayland, either from your distro or
+      manually (see http://wayland.freedesktop.org/building.html).  If
+      you install it to a location other than /usr/bin/Xwayland, specify
+      this in the following env var:
 
       export DISTCHECK_CONFIGURE_FLAGS="--with-xserver-path=<your-Xwayland-path>"
 

commit ad1218ffe6968faa94bc261c9cc71f030e2ba205
Author: Daniel Stone <daniels@collabora.com>
Date:   Wed Feb 11 18:15:18 2015 +0000

    weston-egl-ext: Define EGL tokens harder for old Mesa
    
    Older versions of Mesa provided header definitions for the
    EGL_WL_bind_wayland_display extension, but an earlier version of the
    extension which only provided the (un)bind entrypoints, and not
    QueryWaylandBuffer. Detect this half-provision and make sure we export
    the QueryWaylandBuffer definitions as well.
    
    Fixes build failure with EGL on Ubuntu 12.04.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
    Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>

diff --git a/src/weston-egl-ext.h b/src/weston-egl-ext.h
index 4888323..145322b 100644
--- a/src/weston-egl-ext.h
+++ b/src/weston-egl-ext.h
@@ -33,6 +33,29 @@
 #ifndef EGL_WL_bind_wayland_display
 #define EGL_WL_bind_wayland_display 1
 
+struct wl_display;
+
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
+EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
+#endif
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
+#endif
+
+/*
+ * This is a little different to the tests shipped with EGL implementations,
+ * which wrap the entire thing in #ifndef EGL_WL_bind_wayland_display, then go
+ * on to define both BindWaylandDisplay and QueryWaylandBuffer.
+ *
+ * Unfortunately, some implementations (particularly the version of Mesa shipped
+ * in Ubuntu 12.04) define EGL_WL_bind_wayland_display, but then only provide
+ * prototypes for (Un)BindWaylandDisplay, completely omitting
+ * QueryWaylandBuffer.
+ *
+ * Detect this, and provide our own definitions if necessary.
+ */
+#ifndef EGL_WAYLAND_BUFFER_WL
 #define EGL_WAYLAND_BUFFER_WL		0x31D5 /* eglCreateImageKHR target */
 #define EGL_WAYLAND_PLANE_WL		0x31D6 /* eglCreateImageKHR target */
 
@@ -41,15 +64,10 @@
 #define EGL_TEXTURE_Y_XUXV_WL           0x31D9
 #define EGL_TEXTURE_EXTERNAL_WL         0x31DA
 
-struct wl_display;
 struct wl_resource;
 #ifdef EGL_EGLEXT_PROTOTYPES
-EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
-EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display);
 EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL(EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
 #endif
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
-typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display);
 typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWL) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value);
 #endif
 

commit e78977196c8a1c74990396f1c97a7a384145abc8
Author: Daniel Stone <daniels@collabora.com>
Date:   Wed Feb 11 18:15:17 2015 +0000

    tests: Include weston-egl-ext from weston-test
    
    weston-test uses eglBindWaylandDisplayWL and friends, which are defined
    either by the EGL implementation, or weston-egl-ext.h as a fallback.
    Include weston-egl-ext.h from weston-test, so we can build on systems
    whose native EGL implementation doesn't give us the needed defines.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
    Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>

diff --git a/tests/weston-test.c b/tests/weston-test.c
index 77eaa23..8777f70 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -33,6 +33,7 @@
 #ifdef ENABLE_EGL
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
+#include "../src/weston-egl-ext.h"
 #endif /* ENABLE_EGL */
 
 struct weston_test {

commit a9d0b6836e69cccc072b894505b6db636117abd0
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Thu Feb 12 16:49:15 2015 -0800

    releasing:  Revert fix and just document work-around of Xwayland path
    
    If Xwayland is not in /usr/bin, distcheck will fail without patch
    023b265b, which propagates @XSERVER_PATH@ to distcheck but blocks other
    use of the DISTCHECK_CONFIGURE_FLAGS env var.  Instead, revert the fix
    and merely document the need for setting DISTCHECK_CONFIGURE_FLAGS
    manually.
    
    Revert "build:  Pass along any user-specified xserver path to distcheck"
    
    This reverts commit 023b265b44a8ffc9dd303abc50f8b060a2115e55.

diff --git a/Makefile.am b/Makefile.am
index 0ee674d..1864b70 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,7 +9,6 @@ noinst_LTLIBRARIES =
 BUILT_SOURCES =
 
 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
-DISTCHECK_CONFIGURE_FLAGS = --with-xserver-path='@XSERVER_PATH@'
 
 EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
 
diff --git a/releasing.txt b/releasing.txt
index b704725..4ea210b 100644
--- a/releasing.txt
+++ b/releasing.txt
@@ -15,7 +15,14 @@ To make a release of Weston and/or Wayland, follow these steps.
       $ git commit configure.ac -m "configure.ac: bump to version x.y.z for the xxx release"
       $ git push
 
-  2.  Run the release.sh script to generate the tarballs, sign and
+  2.  Install Xwayland, either from your distro or manually (see
+      http://wayland.freedesktop.org/building.html).  If you install it
+      to a location other than /usr/bin/Xwayland, specify this in the
+      following env var:
+
+      export DISTCHECK_CONFIGURE_FLAGS="--with-xserver-path=<your-Xwayland-path>"
+
+  3.  Run the release.sh script to generate the tarballs, sign and
       upload them, and generate a release announcement template.
       This script can be obtained from X.org's modular package:
 
@@ -27,26 +34,26 @@ To make a release of Weston and/or Wayland, follow these steps.
       skip testsuite by specifying the --dist argument.  Pass --help to
       see other supported options.
 
-  3.  Compose the release announcements.  The script will generate
+  4.  Compose the release announcements.  The script will generate
       *.x.y.0.announce files with a list of changes and tags, one for
       wayland, one for weston.  Prepend these with a human-readable
       listing of the most notable changes.  For x.y.0 releases, indicate
       the schedule for the x.y+1.0 release.
 
-  4.  Send the release announcements to
+  5.  Send the release announcements to
       wayland-devel@lists.freedesktop.org
 
-  5.  Get your freshly posted release email URL from
+  6.  Get your freshly posted release email URL from
       http://lists.freedesktop.org/archives/wayland-devel/
 
-  6.  Update releases.html in wayland-web with links to tarballs and
+  7.  Update releases.html in wayland-web with links to tarballs and
       the release email URL.
 
       $ git commit releases.html -m "Add x.y.z release"
       $ git push
       $ rsync -avz * wayland.freedesktop.org:/srv/wayland.freedesktop.org/www/
 
-  7.  Update topic in #wayland to point to the release announcement URL
+  8.  Update topic in #wayland to point to the release announcement URL
 
 
 For x.y.0 releases, also create the x.y branch.  The x.y branch is for

commit b6ddf6c229ae3c83a196736a3e67eed77f87f7f4
Author: Giulio Camuffo <giuliocamuffo@gmail.com>
Date:   Fri Feb 6 19:06:54 2015 +0200

    input: store the grab serial of the keyboard
    
    The serial can be checked against the one passed to wl_shell.set_popup
    or equivalent.
    Reviewed-by: Daniel Stone <daniels@collabora.com>

diff --git a/src/input.c b/src/input.c
index c039af0..3867de2 100644
--- a/src/input.c
+++ b/src/input.c
@@ -1321,8 +1321,6 @@ notify_key(struct weston_seat *seat, uint32_t time, uint32_t key,
 
 	if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
 		weston_compositor_idle_inhibit(compositor);
-		keyboard->grab_key = key;
-		keyboard->grab_time = time;
 	} else {
 		weston_compositor_idle_release(compositor);
 	}
@@ -1361,6 +1359,13 @@ notify_key(struct weston_seat *seat, uint32_t time, uint32_t key,
 				      key,
 				      state);
 	}
+
+	if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
+		keyboard->grab_serial =
+			wl_display_get_serial(compositor->wl_display);
+		keyboard->grab_time = time;
+		keyboard->grab_key = key;
+	}
 }
 
 WL_EXPORT void

commit 023b265b44a8ffc9dd303abc50f8b060a2115e55
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Mon Feb 9 18:13:15 2015 -0800

    build:  Pass along any user-specified xserver path to distcheck

diff --git a/Makefile.am b/Makefile.am
index 1864b70..0ee674d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -9,6 +9,7 @@ noinst_LTLIBRARIES =
 BUILT_SOURCES =
 
 AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
+DISTCHECK_CONFIGURE_FLAGS = --with-xserver-path='@XSERVER_PATH@'
 
 EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
 

commit 2ef9e81748936728a242a5384ade8b31a5fb21a3
Author: Derek Foreman <derekf@osg.samsung.com>
Date:   Mon Feb 9 09:57:29 2015 -0600

    build: Enable xwayland-test during distcheck
    
    The replacement xwayland-test should succeed, so we should run it
    from distcheck again.
    
    Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>

diff --git a/Makefile.am b/Makefile.am
index 589b47b..1864b70 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,8 +8,7 @@ module_LTLIBRARIES =
 noinst_LTLIBRARIES =
 BUILT_SOURCES =
 
-# Do not run xwayland test while it is known broken.
-AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install --disable-xwayland-test
+AM_DISTCHECK_CONFIGURE_FLAGS = --disable-setuid-install
 
 EXTRA_DIST = weston.ini.in ivi-shell/weston.ini.in
 

commit 1f9d4f9cf91bc7c7a1e75150fddaa632dde72d37
Author: Derek Foreman <derekf@osg.samsung.com>
Date:   Mon Feb 9 09:57:28 2015 -0600

    configure.ac: Don't look for Xwayland in the weston install destination
    
    Xwayland isn't part of this distribution so looking for Xwayland in
    weston's install dir will cause distcheck to fail.  Let's set the
    default to /usr/bin where it's likely to live.
    
    It can still be overriden during configure exactly as before.
    
    Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>

diff --git a/configure.ac b/configure.ac
index 1db9f79..e5f395f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,7 +100,7 @@ if test x$enable_xwayland = xyes; then
 
   AC_ARG_WITH(xserver-path, AS_HELP_STRING([--with-xserver-path=PATH],
               [Path to X server]), [XSERVER_PATH="$withval"],
-              [XSERVER_PATH="$bindir/Xwayland"])
+              [XSERVER_PATH="/usr/bin/Xwayland"])
   AC_SUBST([XSERVER_PATH])
   if test x$enable_xwayland_test = xyes; then
     PKG_CHECK_MODULES([XWAYLAND_TEST], x11)

commit 82d19aabc87a3040edb96c0bda0ef27c4edb26b8
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Fri Feb 6 18:03:43 2015 -0800

    configure.ac bump to version 1.6.93 for the rc2 release.

diff --git a/configure.ac b/configure.ac
index ec7739d..1db9f79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version], [1])
 m4_define([weston_minor_version], [6])
-m4_define([weston_micro_version], [92])
+m4_define([weston_micro_version], [93])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 
@@ -59,7 +59,7 @@ AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
 
-COMPOSITOR_MODULES="wayland-server >= 1.6.92 pixman-1 >= 0.25.2"
+COMPOSITOR_MODULES="wayland-server >= 1.6.93 pixman-1 >= 0.25.2"
 
 AC_ARG_ENABLE(egl, [  --disable-egl],,
               enable_egl=yes)
@@ -292,7 +292,7 @@ AC_SUBST(JPEG_LIBS)
 
 PKG_CHECK_MODULES(CAIRO, [cairo])
 
-PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.92])
+PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.6.93])
 
 AC_ARG_ENABLE(simple-clients,
               AS_HELP_STRING([--disable-simple-clients],

commit 044f79d4890a59c474ca2da53ddf6ff6c0b2f0c6
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Fri Feb 6 18:01:33 2015 -0800

    releasing: Tweak docs to better match actual workflow

diff --git a/releasing.txt b/releasing.txt
index ce94ed2..b704725 100644
--- a/releasing.txt
+++ b/releasing.txt
@@ -1,14 +1,19 @@
 To make a release of Weston and/or Wayland, follow these steps.
 
-  0.  Update the first three lines of configure.ac to the intended
+  0.  Verify the test suites and codebase checks pass.  All of the
+      tests pass should either pass or skip.
+
+      $ make check
+
+  1.  Update the first three lines of configure.ac to the intended
       version, commit.  Also note that Weston includes versioned
       dependencies on 'wayland-server' and 'wayland-client' in
-      configure.ac which typically need updated as well.
+      configure.ac which typically need updated as well.  Then commit
+      your changes:
 
-  1.  Verify the test suites and codebase checks pass.  (All of the
-      tests pass should pass except for xwayland, which can be flaky.)
-
-      $ make check
+      $ git status
+      $ git commit configure.ac -m "configure.ac: bump to version x.y.z for the xxx release"
+      $ git push
 
   2.  Run the release.sh script to generate the tarballs, sign and
       upload them, and generate a release announcement template.

commit bf48e21fa18df9d2c917b8577633107e4b1681de
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Fri Feb 6 10:15:28 2015 +0800

    desktop-shell: Fail if get_xdg_surface is called on an xdg_surface
    
    If a client calls xdg_shell.get_xdg_surface on a surface that is already
    an xdg_surface would, prior to this patch, succeed, but cause weston to
    crash later when trying to configure. This patch instead sends a role
    error to the client complaining that it already is an xdg_surface.
    
    Note that .._set_role() only fails when changing roles, not when setting
    the same role twice.
    
    The same is done for xdg_popup.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 26cadb6..f28fc10 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3978,6 +3978,14 @@ xdg_get_xdg_surface(struct wl_client *client,
 	struct desktop_shell *shell = sc->shell;
 	struct shell_surface *shsurf;
 
+	shsurf = get_shell_surface(surface);
+	if (shsurf && shell_surface_is_xdg_surface(shsurf)) {
+		wl_resource_post_error(resource, XDG_SHELL_ERROR_ROLE,
+				       "This wl_surface is already an "
+				       "xdg_surface");
+		return;
+	}
+
 	if (weston_surface_set_role(surface, "xdg_surface",
 				    resource, XDG_SHELL_ERROR_ROLE) < 0)
 		return;
@@ -4071,6 +4079,14 @@ xdg_get_xdg_popup(struct wl_client *client,
 	struct weston_surface *parent;
 	struct shell_seat *seat;
 
+	shsurf = get_shell_surface(surface);
+	if (shsurf && shell_surface_is_xdg_popup(shsurf)) {
+		wl_resource_post_error(resource, XDG_SHELL_ERROR_ROLE,
+				       "This wl_surface is already an "
+				       "xdg_popup");
+		return;
+	}
+
 	if (weston_surface_set_role(surface, "xdg_popup",
 				    resource, XDG_SHELL_ERROR_ROLE) < 0)
 		return;

commit f10e06c77aee1c27e5f11f02e5ae6e1ae7fd36a5
Author: Derek Foreman <derekf@osg.samsung.com>
Date:   Tue Feb 3 11:05:10 2015 -0600

    xwm: remove the create surface listener in weston_wm_destroy
    
    Failing to remove this can result in a crash when the signal is sent
    after the window manager is destroyed.
    
    Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
    Reviewed-By: Giulio Camuffo <giuliocamuffo@gmail.com>

diff --git a/xwayland/window-manager.c b/xwayland/window-manager.c
index 07c2ef3..ec3dab9 100644
--- a/xwayland/window-manager.c
+++ b/xwayland/window-manager.c
@@ -2229,6 +2229,7 @@ weston_wm_destroy(struct weston_wm *wm)
 	wl_list_remove(&wm->activate_listener.link);
 	wl_list_remove(&wm->kill_listener.link);
 	wl_list_remove(&wm->transform_listener.link);
+	wl_list_remove(&wm->create_surface_listener.link);
 
 	free(wm);
 }

commit 82cc25b986669abf0a516eac0db936c5cd1e916b
Author: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Date:   Fri Feb 6 16:08:52 2015 +0900

    ivi-shell: SEGV occurs when multi touch happens in transition
    
    of application launching. This is because cancel callback is mistakenly
    set to weston_touch_grab_interface. To fix this issue, add a
    callback, touch_move_workspace_grab_frame and set it to the
    weston_touch_grab_interface like desktop-shell.
    
    Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
index 36a1b56..2d15e06 100644
--- a/ivi-shell/hmi-controller.c
+++ b/ivi-shell/hmi-controller.c
@@ -1389,6 +1389,11 @@ pointer_move_workspace_grab_cancel(struct weston_pointer_grab *grab)
 }
 
 static void
+touch_move_workspace_grab_frame(struct weston_touch_grab *grab)
+{
+}
+
+static void
 touch_move_workspace_grab_cancel(struct weston_touch_grab *grab)
 {
 	struct touch_grab *tg = (struct touch_grab *)grab;
@@ -1408,6 +1413,7 @@ static const struct weston_touch_grab_interface touch_move_grab_workspace_interf
 	touch_nope_grab_down,
 	touch_move_workspace_grab_up,
 	touch_move_grab_motion,
+	touch_move_workspace_grab_frame,
 	touch_move_workspace_grab_cancel
 };
 

commit 7b9efcbcbf3d8916160b39dfc2c28ee1c309e4ff
Author: Daniel Stone <daniels@collabora.com>
Date:   Thu Feb 5 15:31:10 2015 +0000

    Update .gitignore
    
    Add autotools remnants, as well as more comprehensive vim swapfiles,
    Sublime Text configuration, and git format-patch output.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Derek Foreman <derekf@osg.samsung.com>

diff --git a/.gitignore b/.gitignore
index 2aaeac9..aa24f9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,10 @@
 *.pc
 *.so
 *.swp
+.*.sw?
+.sw?
+*.sublime-project
+*.sublime-workspace
 *.trs
 *~
 ctags
@@ -16,14 +20,20 @@ cscope.out
 /aclocal.m4
 /autom4te.cache
 /build-aux/
+/config.guess
 /config.h
 /config.h.in
 /config.log
 /config.mk
 /config.status
+/config.sub
 /configure
+/depcomp
+/install-sh
 /libtool
+/ltmain.sh
 /logs
+/missing
 /stamp-h1
 /test-driver
 /weston.ini
@@ -33,6 +43,8 @@ TAGS
 protocol/.*.valid
 protocol/*.[ch]
 
+00*.patch
+
 weston-calibrator
 weston-clickdot
 weston-cliptest

commit d540f4bb76359988cdc54b12d7ae4268a07375fa
Author: Derek Foreman <derekf@osg.samsung.com>
Date:   Tue Jan 27 16:26:49 2015 -0600

    compositor-x11: Move the x11 window close to an idle handler
    
    The input loop is actually dispatched in the middle of the frame repaint.
    When the X11 event results in closing the compositor, this can cause the
    current output to be destroyed just prior to trying to process animations
    on it.
    
    We fix this by handling the window close event in an idle callback.
    
    NOTE: this requires a patch for wayland that moves the idle handler
    dispatch to after epoll_wait in the event loop processing.
    
    Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=81314
    
    Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>

diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 2792251..aa1e519 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -117,6 +117,11 @@ struct x11_output {
 	int32_t                 scale;
 };
 
+struct window_delete_data {
+	struct x11_compositor	*compositor;
+	xcb_window_t		window;
+};
+
 struct gl_renderer_interface *gl_renderer;
 
 static struct xkb_keymap *
@@ -941,6 +946,14 @@ x11_compositor_delete_window(struct x11_compositor *c, xcb_window_t window)
 		wl_display_terminate(c->base.wl_display);
 }
 
+static void delete_cb(void *data)
+{
+	struct window_delete_data *wd = data;
+
+	x11_compositor_delete_window(wd->compositor, wd->window);
+	free(wd);
+}
+
 #ifdef HAVE_XCB_XKB
 static void
 update_xkb_state(struct x11_compositor *c, xcb_xkb_state_notify_event_t *state)
@@ -1284,8 +1297,23 @@ x11_compositor_handle_event(int fd, uint32_t mask, void *data)
 			client_message = (xcb_client_message_event_t *) event;
 			atom = client_message->data.data32[0];
 			window = client_message->window;
-			if (atom == c->atom.wm_delete_window)
-				x11_compositor_delete_window(c, window);
+			if (atom == c->atom.wm_delete_window) {
+				struct wl_event_loop *loop;
+				struct window_delete_data *data = malloc(sizeof *data);
+
+				/* if malloc failed we should at least try to
+				 * delete the window, even if it may result in
+				 * a crash.
+				 */
+				if (!data) {
+					x11_compositor_delete_window(c, window);
+					break;
+				}
+				data->compositor = c;
+				data->window = window;
+				loop = wl_display_get_event_loop(c->base.wl_display);
+				wl_event_loop_add_idle(loop, delete_cb, data);
+			}
 			break;
 
 		case XCB_FOCUS_IN:

commit 3e4d4bdd94f6db154e77df72cc2da366cf72629f
Author: Dima Ryazanov <dima@gmail.com>
Date:   Wed Feb 4 01:51:57 2015 -0800

    Fix "Back", "Forward", and other special mouse buttons in the X11 compositor.
    
    They're off by 4 because of the scroll buttons.
    
    Signed-off-by: Dima Ryazanov <dima@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 5863446..2792251 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1017,8 +1017,8 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
 		update_xkb_state_from_core(c, button_event->state);
 
 	switch (button_event->detail) {
-	default:
-		button = button_event->detail + BTN_LEFT - 1;
+	case 1:
+		button = BTN_LEFT;
 		break;
 	case 2:
 		button = BTN_MIDDLE;
@@ -1056,6 +1056,9 @@ x11_compositor_deliver_button_event(struct x11_compositor *c,
 				    WL_POINTER_AXIS_HORIZONTAL_SCROLL,
 				    DEFAULT_AXIS_STEP_DISTANCE);
 		return;
+	default:
+		button = button_event->detail + BTN_SIDE - 8;
+		break;
 	}
 
 	notify_button(&c->core_seat,

commit 90d1ac8d491e97b0244aa19ba6fe0d2ac934b720
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Fri Jan 30 12:23:00 2015 +0800

    libinput: Only forward first and last press and release for a key
    
    Keyboard key events will be received from a device where a key has
    been pressed, even though an equivalent key has been pressed (same
    key code) on a device connected to the same seat. notify_key()
    expects to only be called as if there was only one keyboard device
    associated with the given seat, so to achieve this, ignore every event
    where forwarding it would result in multiple 'pressed' or 'released'
    notifications.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Derek Foreman <derekf@osg.samsung.com>

diff --git a/src/libinput-device.c b/src/libinput-device.c
index 5c5b9b9..567e5ea 100644
--- a/src/libinput-device.c
+++ b/src/libinput-device.c
@@ -59,6 +59,17 @@ handle_keyboard_key(struct libinput_device *libinput_device,
 {
 	struct evdev_device *device =
 		libinput_device_get_user_data(libinput_device);
+	int key_state =
+		libinput_event_keyboard_get_key_state(keyboard_event);
+	int seat_key_count =
+		libinput_event_keyboard_get_seat_key_count(keyboard_event);
+
+	/* Ignore key events that are not seat wide state changes. */
+	if ((key_state == LIBINPUT_KEY_STATE_PRESSED &&
+	     seat_key_count != 1) ||
+	    (key_state == LIBINPUT_KEY_STATE_RELEASED &&
+	     seat_key_count != 0))
+		return;
 
 	notify_key(device->seat,
 		   libinput_event_keyboard_get_time(keyboard_event),

commit e90b9e9b5958d3e613d7e08f58321fc664084dde
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Fri Jan 30 12:22:59 2015 +0800

    libinput: Only forward first and last press and release for a button
    
    Pointer button events will be received from a device where a button has
    been pressed, even though an equivalent button has been pressed (same
    button code) on a device connected to the same seat. notify_button()
    expects to only be called as if there was only one pointer device
    associated with the given seat, so to achieve this, ignore every event
    where forwarding it would result in multiple 'pressed' or 'released'
    notifications.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniels@collabora.com>

diff --git a/src/libinput-device.c b/src/libinput-device.c
index 3ce74b8..5c5b9b9 100644
--- a/src/libinput-device.c
+++ b/src/libinput-device.c
@@ -119,6 +119,17 @@ handle_pointer_button(struct libinput_device *libinput_device,
 {
 	struct evdev_device *device =
 		libinput_device_get_user_data(libinput_device);
+	int button_state =
+		libinput_event_pointer_get_button_state(pointer_event);
+	int seat_button_count =
+		libinput_event_pointer_get_seat_button_count(pointer_event);
+
+	/* Ignore button events that are not seat wide state changes. */
+	if ((button_state == LIBINPUT_BUTTON_STATE_PRESSED &&
+	     seat_button_count != 1) ||
+	    (button_state == LIBINPUT_BUTTON_STATE_RELEASED &&
+	     seat_button_count != 0))
+		return;
 
 	notify_button(device->seat,
 		      libinput_event_pointer_get_time(pointer_event),

commit 6b4b24155fb3f6fbfc98f38ba3eb5f2f3115371f
Author: Giulio Camuffo <giuliocamuffo@gmail.com>
Date:   Thu Jan 29 19:06:49 2015 +0200

    xwm: support maximizing xwayland windows
    
    This patch adds the maximize button to the window frame for the windows
    which set the MWM_DECOR_MAXIMIZE hint, and it wires it with the shell
    via a new method in weston_shell_interface.
    Additionally, it also listens for the wm hints coming from the client,
    but it doesn't support maximizing a window only vertically or horizontally.
    The window will be maximized only when both directions are maximized.
    
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 742a710..26cadb6 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3000,6 +3000,51 @@ shell_interface_set_fullscreen(struct shell_surface *shsurf,
 	set_fullscreen(shsurf, method, framerate, output);
 }
 
+static struct weston_output *
+get_focused_output(struct weston_compositor *compositor)
+{
+	struct weston_seat *seat;
+	struct weston_output *output = NULL;
+
+	wl_list_for_each(seat, &compositor->seat_list, link) {
+		/* Priority has touch focus, then pointer and
+		 * then keyboard focus. We should probably have
+		 * three for loops and check frist for touch,
+		 * then for pointer, etc. but unless somebody has some
+		 * objections, I think this is sufficient. */
+		if (seat->touch && seat->touch->focus)
+			output = seat->touch->focus->output;
+		else if (seat->pointer && seat->pointer->focus)
+			output = seat->pointer->focus->output;
+		else if (seat->keyboard && seat->keyboard->focus)
+			output = seat->keyboard->focus->output;
+
+		if (output)
+			break;
+	}
+
+	return output;
+}
+
+static void
+shell_interface_set_maximized(struct shell_surface *shsurf)
+{
+	struct weston_output *output;
+
+	surface_clear_next_states(shsurf);
+	shsurf->next_state.maximized = true;
+	shsurf->state_changed = true;
+	shsurf->type = SHELL_SURFACE_TOPLEVEL;
+
+	if (!weston_surface_is_mapped(shsurf->surface))
+		output = get_focused_output(shsurf->surface->compositor);
+	else
+		output = shsurf->surface->output;
+
+	shell_surface_set_output(shsurf, output);
+	send_configure_for_surface(shsurf);
+}
+
 static int
 shell_interface_move(struct shell_surface *shsurf, struct weston_seat *ws)
 {
@@ -3605,32 +3650,6 @@ get_primary_view(void *shell, struct shell_surface *shsurf)
 	return shsurf->view;
 }
 


Reply to: