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

weston: Changes to 'upstream-unstable'



 Makefile.am                           |   70 +-
 clients/clickdot.c                    |    1 
 clients/cliptest.c                    |    1 
 clients/desktop-shell.c               |   62 +
 clients/dnd.c                         |    1 
 clients/editor.c                      |    1 
 clients/eventdemo.c                   |   49 +
 clients/flower.c                      |    2 
 clients/fullscreen.c                  |    7 
 clients/ivi-shell-user-interface.c    |   40 -
 clients/keyboard.c                    |    1 
 clients/multi-resource.c              |   16 
 clients/nested.c                      |    1 
 clients/presentation-shm.c            |   72 +-
 clients/resizor.c                     |    1 
 clients/scaler.c                      |    2 
 clients/screenshot.c                  |   16 
 clients/simple-damage.c               |    3 
 clients/simple-dmabuf-intel.c         |    3 
 clients/simple-dmabuf-v4l.c           |    3 
 clients/simple-egl.c                  |    2 
 clients/simple-shm.c                  |   12 
 clients/smoke.c                       |    2 
 clients/subsurfaces.c                 |    4 
 clients/terminal.c                    |    1 
 clients/weston-info.c                 |   54 -
 clients/window.c                      |   47 -
 clients/window.h                      |   11 
 configure.ac                          |  136 ++--
 data/COPYING                          |   18 
 data/icon_editor.png                  |binary
 data/icon_flower.png                  |binary
 data/icon_terminal.png                |binary
 data/icons.svg                        | 1012 +++++++++++++++++++++++++++++++
 desktop-shell/shell.c                 |   44 +
 fullscreen-shell/fullscreen-shell.c   |    2 
 ivi-shell/hmi-controller.c            |  209 ++----
 ivi-shell/input-panel-ivi.c           |    8 
 ivi-shell/ivi-layout-export.h         |  365 ++---------
 ivi-shell/ivi-layout-private.h        |   49 -
 ivi-shell/ivi-layout-shell.h          |   63 +
 ivi-shell/ivi-layout-transition.c     |   42 -
 ivi-shell/ivi-layout.c                | 1079 ++++------------------------------
 ivi-shell/ivi-shell.c                 |   75 +-
 ivi-shell/ivi-shell.h                 |    9 
 m4/weston.m4                          |   37 +
 man/weston.ini.man                    |   24 
 protocol/ivi-application.xml          |    2 
 protocol/presentation_timing.xml      |  274 --------
 releasing.txt                         |   15 
 shared/config-parser.c                |   22 
 shared/image-loader.c                 |   41 +
 shared/option-parser.c                |   41 +
 shared/platform.h                     |   10 
 shared/xalloc.c                       |   54 +
 shared/xalloc.h                       |   50 +
 src/compositor-drm.c                  |  307 ++++-----
 src/compositor-drm.h                  |  127 ++++
 src/compositor-fbdev.c                |   79 +-
 src/compositor-fbdev.h                |   51 +
 src/compositor-headless.c             |   78 +-
 src/compositor-headless.h             |   53 +
 src/compositor-rdp.c                  |  127 ++--
 src/compositor-rdp.h                  |   54 +
 src/compositor-rpi.c                  |    8 
 src/compositor-wayland.c              |  241 ++-----
 src/compositor-wayland.h              |   61 +
 src/compositor-x11.c                  |  188 ++---
 src/compositor-x11.h                  |   62 +
 src/compositor.c                      |  176 ++---
 src/compositor.h                      |   67 +-
 src/data-device.c                     |   22 
 src/gl-renderer.c                     |   56 +
 src/input.c                           |   29 
 src/libinput-device.c                 |   32 -
 src/libinput-seat.c                   |    3 
 src/linux-dmabuf.c                    |    2 
 src/main.c                            |  617 +++++++++++++++++++
 src/screen-share.c                    |    5 
 src/systemd-notify.c                  |   45 +
 src/weston.pc.in                      |    1 
 tests/ivi_layout-internal-test.c      |  421 ++-----------
 tests/ivi_layout-test-plugin.c        |  219 ++----
 tests/ivi_layout-test.c               |    3 
 tests/presentation-test.c             |   35 -
 tests/weston-test-client-helper.c     |   29 
 tests/weston-test-client-helper.h     |   15 
 tests/weston-tests-env                |   20 
 tools/zunitc/inc/zunitc/zunitc.h      |    2 
 tools/zunitc/src/zuc_base_logger.c    |   21 
 tools/zunitc/src/zuc_junit_reporter.c |   34 -
 tools/zunitc/src/zunitc_impl.c        |   11 
 weston.ini.in                         |    1 
 xwayland/selection.c                  |    4 
 94 files changed, 4053 insertions(+), 3419 deletions(-)

New commits:
commit 2d825ed9eb0388d47e9fc14294f6f6d63d5c230c
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue May 31 17:10:40 2016 -0700

    configure.ac: bump to version 1.11.0 for the official release

diff --git a/configure.ac b/configure.ac
index 00f20b7..97a7769 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version],  [1])
-m4_define([weston_minor_version], [10])
-m4_define([weston_micro_version], [93])
+m4_define([weston_minor_version], [11])
+m4_define([weston_micro_version],  [0])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 

commit 7b0d18e1411fd8ec4b7e67a1cfb5c508a2aacee1
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue May 31 15:52:33 2016 -0700

    releasing: Update script name

diff --git a/releasing.txt b/releasing.txt
index f629c86..9767912 100644
--- a/releasing.txt
+++ b/releasing.txt
@@ -68,7 +68,7 @@ To make a release of Weston and/or Wayland, follow these steps.
 
       The wl_register_release script in wayland-web will generate an HTML
       snippet that can be pasted into releases.html (or e.g. in emacs
-      insert it via "C-u M-! scripts/register_release x.y.z") and
+      insert it via "C-u M-! scripts/wl_register_release x.y.z") and
       customized.
 
       Once satisfied:

commit 53ee6cbb1d50bf9ec439182654f66f48e3694c2c
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue May 24 12:35:48 2016 -0700

    configure.ac: bump to version 1.10.93 for the RC1 release

diff --git a/configure.ac b/configure.ac
index d034907..00f20b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version],  [1])
 m4_define([weston_minor_version], [10])
-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])
 

commit f89cd51e0cbd9a6ffe29aae6b3c6844d7ecc5321
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue May 24 12:34:44 2016 -0700

    releasing: Update release docs in regards to the wayland versioned dependency

diff --git a/releasing.txt b/releasing.txt
index 131ff31..f629c86 100644
--- a/releasing.txt
+++ b/releasing.txt
@@ -5,15 +5,12 @@ To make a release of Weston and/or Wayland, follow these steps.
 
       $ make check
 
-  1.  Verify that the wayland-protocols version dependency is correct,
-      and that wayland-protocols has had a release with any needed
-      protocol updates.
+  1.  For Weston, verify that the wayland and wayland-protocols version
+      dependencies are correct, and that wayland-protocols has had a
+      release with any needed protocol updates.
 
   2.  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 occasionally need updated as well.  Then commit
-      your changes:
+      version, commit.  Then commit your changes:
 
       $ export RELEASE_NUMBER="x.y.z"
       $ export RELEASE_NAME="[alpha|beta|RC1|RC2|official|point]"

commit 46f1f0516cfdd9e0bb99aa7e0545f6ef1dc64bd6
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Wed May 11 13:18:59 2016 -0700

    build: Define wayland prereq version
    
    Establishes a single variable for defining the libwayland version
    requirements, where we have versioned checks.  Enforces the same version
    dependency between libwayland-client and libwayland-server.  Developers
    typically only test the greater version of the two, so if they're
    different it masks cases that don't get tested adequately.  So this sets
    wayland-client's required version to 1.10, same as for the server.
    
    Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Tested-by: Quentin Glidic <sardemff7+git@sardemff7.net>

diff --git a/configure.ac b/configure.ac
index e1300b4..d034907 100644
--- a/configure.ac
+++ b/configure.ac
@@ -11,6 +11,8 @@ AC_INIT([weston],
         [weston],
         [http://wayland.freedesktop.org])
 
+WAYLAND_PREREQ_VERSION="1.10.0"
+
 AC_SUBST([WESTON_VERSION_MAJOR], [weston_major_version])
 AC_SUBST([WESTON_VERSION_MINOR], [weston_minor_version])
 AC_SUBST([WESTON_VERSION_MICRO], [weston_micro_version])
@@ -60,7 +62,7 @@ AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate])
 
-COMPOSITOR_MODULES="wayland-server >= 1.10.0 pixman-1 >= 0.25.2"
+COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
 
 AC_CONFIG_FILES([doc/doxygen/tools.doxygen doc/doxygen/tooldev.doxygen])
 
@@ -193,7 +195,7 @@ AM_CONDITIONAL(ENABLE_WAYLAND_COMPOSITOR,
 if test x$enable_wayland_compositor = xyes -a x$enable_egl = xyes; then
   AC_DEFINE([BUILD_WAYLAND_COMPOSITOR], [1],
 	    [Build the Wayland (nested) compositor])
-  PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= 1.5.91 wayland-egl wayland-cursor])
+  PKG_CHECK_MODULES(WAYLAND_COMPOSITOR, [wayland-client >= $WAYLAND_PREREQ_VERSION wayland-egl wayland-cursor])
 fi
 
 
@@ -335,7 +337,7 @@ AM_CONDITIONAL(ENABLE_VAAPI_RECORDER, test "x$have_libva" = xyes)
 
 PKG_CHECK_MODULES(CAIRO, [cairo])
 
-PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= 1.10.0])
+PKG_CHECK_MODULES(TEST_CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION])
 
 AC_ARG_ENABLE(simple-clients,
               AS_HELP_STRING([--disable-simple-clients],
@@ -389,9 +391,9 @@ AM_CONDITIONAL(BUILD_CLIENTS, test x$enable_clients = xyes)
 if test x$enable_clients = xyes; then
   AC_DEFINE([BUILD_CLIENTS], [1], [Build the Wayland clients])
 
-  PKG_CHECK_MODULES(CLIENT, [wayland-client >= 1.5.91 cairo >= 1.10.0 xkbcommon wayland-cursor])
+  PKG_CHECK_MODULES(CLIENT, [wayland-client >= $WAYLAND_PREREQ_VERSION cairo >= 1.10.0 xkbcommon wayland-cursor])
   PKG_CHECK_MODULES(SERVER, [wayland-server])
-  PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= 1.5.91])
+  PKG_CHECK_MODULES(WESTON_INFO, [wayland-client >= $WAYLAND_PREREQ_VERSION])
 
   # Only check for cairo-egl if a GL or GLES renderer requested
   AS_IF([test "x$cairo_modules" = "xcairo-gl" -o "x$cairo_modules" = "xcairo-glesv2"], [

commit 28834b6472d763fae005a35d6e7a6c756ccced05
Author: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Date:   Tue May 10 03:22:43 2016 +0200

    desktop-shell: Don’t reconfigure an already fullscreen surface
    
    When we receive an wl_shell_surface::set_fullscreen request for a
    surface that was already fullscreen, don’t do anything if the
    parameters are the same as the initial request.
    
    This prevents bogus or malicious clients from being able to always stay
    on front by flooding the compositor with set_fullscreen requests after
    the user has put them in the background with a mod+tab.
    
    Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
    Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 1c39a12..7d5bca9 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2561,6 +2561,13 @@ shell_surface_set_fullscreen(struct wl_client *client,
 	struct shell_surface *shsurf = wl_resource_get_user_data(resource);
 	struct weston_output *output;
 
+	if (shsurf->fullscreen_output == shsurf->output &&
+	    shsurf->fullscreen.type == method &&
+	    shsurf->fullscreen.framerate == framerate) {
+		send_configure_for_surface(shsurf);
+		return;
+	}
+
 	if (output_resource)
 		output = wl_resource_get_user_data(output_resource);
 	else

commit e6da35d0678797e7e592917545869b1eab33b8d0
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Thu May 19 17:35:02 2016 -0700

    ivi: Fix spellings in comments

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 1601787..7fa8b33 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -25,15 +25,15 @@
 
 /**
  * Implementation of ivi-layout library. The actual view on ivi_screen is
- * not updated till calling ivi_layout_commit_changes. A overview from
+ * not updated until ivi_layout_commit_changes is called. An overview from
  * calling API for updating properties of ivi_surface/ivi_layer to asking
  * compositor to compose them by using weston_compositor_schedule_repaint,
  * 0/ initialize this library by ivi_layout_init_with_compositor
  *    with (struct weston_compositor *ec) from ivi-shell.
- * 1/ When a API for updating properties of ivi_surface/ivi_layer, it updates
+ * 1/ When an API for updating properties of ivi_surface/ivi_layer, it updates
  *    pending prop of ivi_surface/ivi_layer/ivi_screen which are structure to
  *    store properties.
- * 2/ Before calling commitChanges, in case of calling a API to get a property,
+ * 2/ Before calling commitChanges, in case of calling an API to get a property,
  *    return current property, not pending property.
  * 3/ At the timing of calling ivi_layout_commitChanges, pending properties
  *    are applied to properties.
@@ -42,11 +42,11 @@
  *    per each frame. See ivi-layout-transition.c in details. Transition
  *    animation interpolates frames between previous properties of ivi_surface
  *    and new ones.
- *    For example, when a property of ivi_surface is changed from invisibility
- *    to visibility, it behaves like fade-in. When ivi_layout_commitChange is
+ *    For example, when a property of ivi_surface is changed from invisibile
+ *    to visibile, it behaves like fade-in. When ivi_layout_commitChange is
  *    called during transition animation, it cancels the transition and
  *    re-start transition to new properties from current properties of final
- *    frame just before the the cancellation.
+ *    frame just before the cancellation.
  *
  * 4/ According properties, set transformation by using weston_matrix and
  *    weston_view per ivi_surfaces and ivi_layers in while loop.
@@ -108,7 +108,7 @@ get_instance(void)
 }
 
 /**
- * Internal API to add/remove a ivi_layer to/from ivi_screen.
+ * Internal API to add/remove an ivi_layer to/from ivi_screen.
  */
 static struct ivi_layout_surface *
 get_surface(struct wl_list *surf_list, uint32_t id_surface)
@@ -246,7 +246,7 @@ init_surface_properties(struct ivi_layout_surface_properties *prop)
 	memset(prop, 0, sizeof *prop);
 	prop->opacity = wl_fixed_from_double(1.0);
 	/*
-	 * FIXME: this shall be finxed by ivi-layout-transition.
+	 * FIXME: this shall be fixed by ivi-layout-transition.
 	 */
 	prop->dest_width = 1;
 	prop->dest_height = 1;
@@ -459,7 +459,7 @@ calc_inverse_matrix_transform(const struct weston_matrix *matrix,
  * coordinates to multi-screen coordinates, which are global coordinates.
  * It is assumed that weston_view::geometry.{x,y} are zero.
  *
- * Additionally, this computes the mask on surface-local coordinates as a
+ * Additionally, this computes the mask on surface-local coordinates as an
  * ivi_rectangle. This can be set to weston_view_set_mask.
  *
  * The mask is computed by following steps
@@ -1112,7 +1112,7 @@ ivi_layout_get_layers(int32_t *pLength, struct ivi_layout_layer ***ppArray)
 	length = wl_list_length(&layout->layer_list);
 
 	if (length != 0) {
-		/* the Array must be free by module which called this function */
+		/* the Array must be freed by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
 		if (*ppArray == NULL) {
 			weston_log("fails to allocate memory\n");
@@ -1148,7 +1148,7 @@ ivi_layout_get_layers_on_screen(struct weston_output *output,
 	length = wl_list_length(&iviscrn->order.layer_list);
 
 	if (length != 0) {
-		/* the Array must be free by module which called this function */
+		/* the Array must be freed by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_layer *));
 		if (*ppArray == NULL) {
 			weston_log("fails to allocate memory\n");
@@ -1179,7 +1179,7 @@ ivi_layout_get_layers_under_surface(struct ivi_layout_surface *ivisurf,
 	}
 
 	if (ivisurf->on_layer != NULL) {
-		/* the Array must be free by module which called this function */
+		/* the Array must be freed by module which called this function */
 		length = 1;
 		*ppArray = calloc(length, sizeof(struct ivi_layout_screen *));
 		if (*ppArray == NULL) {
@@ -1212,7 +1212,7 @@ ivi_layout_get_surfaces(int32_t *pLength, struct ivi_layout_surface ***ppArray)
 	length = wl_list_length(&layout->surface_list);
 
 	if (length != 0) {
-		/* the Array must be free by module which called this function */
+		/* the Array must be freed by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_surface *));
 		if (*ppArray == NULL) {
 			weston_log("fails to allocate memory\n");
@@ -1246,7 +1246,7 @@ ivi_layout_get_surfaces_on_layer(struct ivi_layout_layer *ivilayer,
 	length = wl_list_length(&ivilayer->order.surface_list);
 
 	if (length != 0) {
-		/* the Array must be free by module which called this function */
+		/* the Array must be freed by module which called this function */
 		*ppArray = calloc(length, sizeof(struct ivi_layout_surface *));
 		if (*ppArray == NULL) {
 			weston_log("fails to allocate memory\n");

commit 1764d22f919b62bcb7948b8e07eaa40746b5f458
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Wed May 18 17:18:18 2016 +0100

    zunitc: use platform-independent macros for integer formatting
    
    Fixes warnings and potential issues on 32-bit platforms, tested only on
    ARM but I’d expect the same issue on i686.
    
    Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/tools/zunitc/src/zuc_base_logger.c b/tools/zunitc/src/zuc_base_logger.c
index cdbd9ea..ffa127f 100644
--- a/tools/zunitc/src/zuc_base_logger.c
+++ b/tools/zunitc/src/zuc_base_logger.c
@@ -27,6 +27,7 @@
 
 #include "zuc_base_logger.h"
 
+#include <inttypes.h>
 #include <memory.h>
 #include <stdarg.h>
 #include <stdbool.h>
@@ -363,9 +364,9 @@ check_triggered(void *data, char const *file, int line,
 		} else {
 			printf("%s:%d: error: Value of: %s\n", file, line,
 			       expr2);
-			printf("  Actual: %ld\n", val2);
+			printf("  Actual: %"PRIdPTR"\n", val2);
 			printf("Expected: %s\n", expr1);
-			printf("Which is: %ld\n", val1);
+			printf("Which is: %"PRIdPTR"\n", val1);
 		}
 		break;
 	case ZUC_OP_NE:
@@ -376,8 +377,9 @@ check_triggered(void *data, char const *file, int line,
 			       (char *)val1, (char *)val2);
 		} else {
 			printf("%s:%d: error: ", file, line);
-			printf("Expected: (%s) %s (%s), actual: %ld vs %ld\n",
-			       expr1, zuc_get_opstr(op), expr2, val1, val2);
+			printf("Expected: (%s) %s (%s), actual: %"PRIdPTR" vs "
+			       "%"PRIdPTR"\n", expr1, zuc_get_opstr(op), expr2,
+			       val1, val2);
 		}
 		break;
 	case ZUC_OP_TERMINATE: {
@@ -392,7 +394,8 @@ check_triggered(void *data, char const *file, int line,
 		break;
 	default:
 		printf("%s:%d: error: ", file, line);
-		printf("Expected: (%s) %s (%s), actual: %ld vs %ld\n",
-		       expr1, zuc_get_opstr(op), expr2, val1, val2);
+		printf("Expected: (%s) %s (%s), actual: %"PRIdPTR" vs "
+		       "%"PRIdPTR"\n", expr1, zuc_get_opstr(op), expr2, val1,
+		       val2);
 	}
 }
diff --git a/tools/zunitc/src/zuc_junit_reporter.c b/tools/zunitc/src/zuc_junit_reporter.c
index a33b33f..369f035 100644
--- a/tools/zunitc/src/zuc_junit_reporter.c
+++ b/tools/zunitc/src/zuc_junit_reporter.c
@@ -30,6 +30,7 @@
 #if ENABLE_JUNIT_XML
 
 #include <fcntl.h>
+#include <inttypes.h>
 #include <libxml/parser.h>
 #include <memory.h>
 #include <stdio.h>
@@ -128,12 +129,12 @@ emit_event(xmlNodePtr parent, struct zuc_event *event)
 			}
 		} else {
 			if (asprintf(&msg, "%s:%d: error: Value of: %s\n"
-				     "  Actual: %ld\n"
-				     "Expected: %s\n"
-				     "Which is: %ld\n",
-				     event->file, event->line, event->expr2,
-				     event->val2, event->expr1,
-				     event->val1) < 0) {
+			             "  Actual: %"PRIdPTR"\n"
+			             "Expected: %s\n"
+			             "Which is: %"PRIdPTR"\n",
+			             event->file, event->line, event->expr2,
+			             event->val2, event->expr1,
+			             event->val1) < 0) {
 				msg = NULL;
 			}
 		}
@@ -151,12 +152,12 @@ emit_event(xmlNodePtr parent, struct zuc_event *event)
 			}
 		} else {
 			if (asprintf(&msg, "%s:%d: error: "
-				     "Expected: (%s) %s (%s),"
-				     " actual: %ld vs %ld\n",
-				     event->file, event->line,
-				     event->expr1, zuc_get_opstr(event->op),
-				     event->expr2, event->val1,
-				     event->val2) < 0) {
+			             "Expected: (%s) %s (%s),"
+			             " actual: %"PRIdPTR" vs %"PRIdPTR"\n",
+			             event->file, event->line,
+			             event->expr1, zuc_get_opstr(event->op),
+			             event->expr2, event->val1,
+			             event->val2) < 0) {
 				msg = NULL;
 			}
 		}
@@ -181,10 +182,11 @@ emit_event(xmlNodePtr parent, struct zuc_event *event)
 		break;
 	default:
 		if (asprintf(&msg, "%s:%d: error: "
-			     "Expected: (%s) %s (%s), actual: %ld vs %ld\n",
-			     event->file, event->line,
-			     event->expr1, zuc_get_opstr(event->op),
-			     event->expr2, event->val1, event->val2) < 0) {
+		             "Expected: (%s) %s (%s), actual: %"PRIdPTR" vs "
+		             "%"PRIdPTR"\n",
+		             event->file, event->line,
+		             event->expr1, zuc_get_opstr(event->op),
+		             event->expr2, event->val1, event->val2) < 0) {
 			msg = NULL;
 		}
 	}

commit 8a120690a19219312591b5a1710a0d155819787f
Author: FORT David <rdp.effort@gmail.com>
Date:   Tue Apr 26 23:34:06 2016 +0200

    compositor: use generated constant instead of hardcoded value
    
    Use SINCE macros instead of the hardcoded version value.
    
    Signed-off-by: David Fort <contact@hardening-consulting.com>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/src/compositor.c b/src/compositor.c
index 40d8baf..b6ef7f3 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4234,7 +4234,7 @@ weston_output_move(struct weston_output *output, int x, int y)
 					output->model,
 					output->transform);
 
-		if (wl_resource_get_version(resource) >= 2)
+		if (wl_resource_get_version(resource) >= WL_OUTPUT_DONE_SINCE_VERSION)
 			wl_output_send_done(resource);
 	}
 }

commit 2d4aa83fe194695aeaa76ddd2d00b9dcddc39433
Author: FORT David <rdp.effort@gmail.com>
Date:   Tue Apr 26 23:34:05 2016 +0200

    rdp: Fix the ContextNew callback with recent FreeRDP versions
    
    Since a quite long time FreeRDP expect the ContextNew callback to return TRUE
    when it succeeds. Without this we have some arbitrary failures (most probably
    when eax is 0 at the end of the function).
    
    Signed-off-by: David Fort <contact@hardening-consulting.com>

diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index f6778b6..4fc7c74 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -587,7 +587,7 @@ int rdp_implant_listener(struct rdp_backend *b, freerdp_listener* instance)
 }
 
 
-static void
+static FREERDP_CB_RET_TYPE
 rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
 {
 	context->item.peer = client;
@@ -598,15 +598,32 @@ rdp_peer_context_new(freerdp_peer* client, RdpPeerContext* context)
 #else
 	context->rfx_context = rfx_context_new(TRUE);
 #endif
+	if (!context->rfx_context) {
+		FREERDP_CB_RETURN(FALSE);
+	}
+
 	context->rfx_context->mode = RLGR3;
 	context->rfx_context->width = client->settings->DesktopWidth;
 	context->rfx_context->height = client->settings->DesktopHeight;
 	rfx_context_set_pixel_format(context->rfx_context, RDP_PIXEL_FORMAT_B8G8R8A8);
 
 	context->nsc_context = nsc_context_new();
+	if (!context->nsc_context)
+		goto out_error_nsc;
+
 	nsc_context_set_pixel_format(context->nsc_context, RDP_PIXEL_FORMAT_B8G8R8A8);
 
 	context->encode_stream = Stream_New(NULL, 65536);
+	if (!context->encode_stream)
+		goto out_error_stream;
+
+	FREERDP_CB_RETURN(TRUE);
+
+out_error_nsc:
+	rfx_context_free(context->rfx_context);
+out_error_stream:
+	nsc_context_free(context->nsc_context);
+	FREERDP_CB_RETURN(FALSE);
 }
 
 static void

commit 58b63ab7f1eec70c421b42a509f13dbc08a558ad
Author: FORT David <rdp.effort@gmail.com>
Date:   Sun May 1 23:32:07 2016 +0200

    rdp: allow to compile against FreeRDP 2.0
    
    FreeRDP 2.0 is about to be released, this allows to compile against this version.
    The detection is adjusted to prefer FreeRDP 2 against version 1.x.
    
    Signed-off-by: David Fort <contact@hardening-consulting.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>

diff --git a/configure.ac b/configure.ac
index c49c632..e1300b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -238,7 +238,10 @@ AM_CONDITIONAL([ENABLE_RDP_COMPOSITOR],
                [test x$enable_rdp_compositor = xyes])
 if test x$enable_rdp_compositor = xyes; then
   AC_DEFINE([BUILD_RDP_COMPOSITOR], [1], [Build the RDP compositor])
-  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0])
+  PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp2 >= 2.0.0],
+    [],
+    [PKG_CHECK_MODULES(RDP_COMPOSITOR, [freerdp >= 1.1.0],[])]
+  )
 
   SAVED_CPPFLAGS="$CPPFLAGS"
   CPPFLAGS="$CPPFLAGS $RDP_COMPOSITOR_CFLAGS"
diff --git a/src/compositor-rdp.c b/src/compositor-rdp.c
index 2860556..f6778b6 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -42,15 +42,24 @@
 #define FREERDP_VERSION_NUMBER ((FREERDP_VERSION_MAJOR * 0x10000) + \
 		(FREERDP_VERSION_MINOR * 0x100) + FREERDP_VERSION_REVISION)
 
+
 #if FREERDP_VERSION_NUMBER >= 0x10201
 #define HAVE_SKIP_COMPRESSION
 #endif
 
 #if FREERDP_VERSION_NUMBER < 0x10202
-#define FREERDP_CB_RET_TYPE void
-#define FREERDP_CB_RETURN(V) return
+#	define FREERDP_CB_RET_TYPE void
+#	define FREERDP_CB_RETURN(V) return
+#	define NSC_RESET(C, W, H)
+#	define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; C->height = H; } while(0)
+#else
+#if FREERDP_VERSION_MAJOR >= 2
+#	define NSC_RESET(C, W, H) nsc_context_reset(C, W, H)
+#	define RFX_RESET(C, W, H) rfx_context_reset(C, W, H)
 #else
-#define HAVE_NSC_RESET
+#	define NSC_RESET(C, W, H) do { nsc_context_reset(C); C->width = W; C->height = H; } while(0)
+#	define RFX_RESET(C, W, H) do { rfx_context_reset(C); C->width = W; C->height = H; } while(0)
+#endif
 #define FREERDP_CB_RET_TYPE BOOL
 #define FREERDP_CB_RETURN(V) return TRUE
 #endif
@@ -795,6 +804,7 @@ xf_peer_activate(freerdp_peer* client)
 	struct xkb_context *xkbContext;
 	struct xkb_rule_names xkbRuleNames;
 	struct xkb_keymap *keymap;
+	struct weston_output *weston_output;
 	int i;
 	pixman_box32_t box;
 	pixman_region32_t damage;
@@ -843,10 +853,9 @@ xf_peer_activate(freerdp_peer* client)
 		}
 	}
 
-	rfx_context_reset(peerCtx->rfx_context);
-#ifdef HAVE_NSC_RESET
-	nsc_context_reset(peerCtx->nsc_context);
-#endif
+	weston_output = &output->base;
+	RFX_RESET(peerCtx->rfx_context, weston_output->width, weston_output->height);
+	NSC_RESET(peerCtx->nsc_context, weston_output->width, weston_output->height);
 
 	if (peersItem->flags & RDP_PEER_ACTIVATED)
 		return TRUE;

commit 0887956e4d2ea747db97ce7943d3e0ff79f89cd9
Author: Bryce Harrington <bryce@osg.samsung.com>
Date:   Tue May 17 22:10:30 2016 -0700

    configure.ac: bump to version 1.10.92 for the beta release

diff --git a/configure.ac b/configure.ac
index 2ca1f4e..c49c632 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version],  [1])
 m4_define([weston_minor_version], [10])
-m4_define([weston_micro_version], [91])
+m4_define([weston_micro_version], [92])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 

commit b8347e3a45db4fc06ac158ae6c9831a8437c91c9
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Mon May 2 22:40:13 2016 +0100

    compositor-drm: Prevent a crash in the pixman renderer
    
    When pixman is used and no connector could be found (or any other
    error), drm_backend_create() tried to destroy a gbm_device that would
    only be created in init_egl(), resulting in a segfault.
    
    Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 1ce9b2d..893877d 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -3191,7 +3191,8 @@ err_drm_source:
 err_udev_input:
 	udev_input_destroy(&b->input);
 err_sprite:
-	gbm_device_destroy(b->gbm);
+	if (b->gbm)
+		gbm_device_destroy(b->gbm);
 	destroy_sprites(b);
 err_udev_dev:
 	udev_device_unref(drm_device);

commit a62138bf908b028d5e19b96b928e771412ab68db
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Mon May 2 22:40:11 2016 +0100

    compositor-drm: Write a name in the mode generated from a modeline
    
    The current behaviour leaves the name empty, making it somewhat harder
    to determine the characteristics of this mode from a debugger.
    
    Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    [Pekka: wrap long line (ybakos)]
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 136d8eb..1ce9b2d 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -2116,6 +2116,9 @@ parse_modeline(const char *s, drmModeModeInfo *mode)
 	else
 		return -1;
 
+	snprintf(mode->name, sizeof mode->name, "%dx%d@%.3f",
+		 mode->hdisplay, mode->vdisplay, fclock);
+
 	return 0;
 }
 

commit 373c1084cb49c717f9c7ef161a57561b4e70d557
Author: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
Date:   Mon May 2 22:40:10 2016 +0100

    compositor-drm: Remove unused output reference in drm_fb
    
    Signed-off-by: Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>
    Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 6ef706a..136d8eb 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -139,10 +139,7 @@ struct drm_mode {
 	drmModeModeInfo mode_info;
 };
 
-struct drm_output;
-
 struct drm_fb {
-	struct drm_output *output;
 	uint32_t fb_id, stride, handle, size;
 	int fd;
 	int is_client_buffer;

commit 130ae6e7d601faa3a5f01c9d88b6814e408fc211
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Date:   Wed Mar 30 14:33:33 2016 +0300

    compositor: surface and view output comment fixes
    
    weston_surface::output and weston_view::output as used for different
    purposes. Only the surface output is used for frame callbacks.
    
    The uses of the view output are much more vague and hard to describe.
    
    Also fix a comment mistake in weston_surface_assign_output().
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
    Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
    [Pekka: more verbose on the compositor.h comments]

diff --git a/src/compositor.c b/src/compositor.c
index ee47a82..40d8baf 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -1082,16 +1082,15 @@ weston_surface_update_output_mask(struct weston_surface *es, uint32_t mask)
 	}
 }
 
-
 /** Recalculate which output(s) the surface has views displayed on
  *
  * \param es  The surface to remap to outputs
  *
  * Finds the output that is showing the largest amount of one
  * of the surface's various views.  This output becomes the
- * surface's primary output for vsync and frame event purposes.
+ * surface's primary output for vsync and frame callback purposes.
  *
- * Also notes the primary outputs of all of the surface's views
+ * Also notes all outputs of all of the surface's views
  * in the output_mask for the surface.
  */
 static void
@@ -1136,8 +1135,7 @@ weston_surface_assign_output(struct weston_surface *es)
  *
  * Identifies the set of outputs that the view is visible on,
  * noting them into the output_mask.  The output that the view
- * is most visible on is set as the view's primary output for
- * vsync and frame event purposes.
+ * is most visible on is set as the view's primary output.
  *
  * Also does the same for the view's surface.  See
  * weston_surface_assign_output().
diff --git a/src/compositor.h b/src/compositor.h
index 91d1a22..0bbf458 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -949,8 +949,9 @@ struct weston_view {
 	} transform;
 
 	/*
-	 * Which output to vsync this surface to.
-	 * Used to determine, whether to send or queue frame events.
+	 * The primary output for this view.
+	 * Used for picking the output for driving internal animations on the
+	 * view, inheriting the primary output for related views in shells, etc.
 	 */
 	struct weston_output *output;
 
@@ -1019,7 +1020,9 @@ struct weston_surface {
 
 	/*
 	 * Which output to vsync this surface to.
-	 * Used to determine, whether to send or queue frame events.
+	 * Used to determine whether to send or queue frame events, and for
+	 * other client-visible syncing/throttling tied to the output
+	 * repaint cycle.
 	 */
 	struct weston_output *output;
 

commit 20c7e559432c9a24fb03adbdd6ca8815246f36fe
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Date:   Wed Mar 30 14:08:24 2016 +0300

    compositor: fix comments about weston_compositor::surface_list
    
    a7af70436b7dccfacd736626d6719b3e751fd985 converted the surface list into
    a view list. There is no weston_compositor::surface_list anymore.
    
    It looks like weston_surface::output's comment about surface list does
    not apply to view list. Still, many places assume weston_surface::output
    is not NULL when processing "visible" surfaces, e.g. those reachable via
    the view list.
    
    The comment on weston_view::output is updated. It seems there is no
    longer any requirement for it to be NULL if the view is not in
    view_list.
    
    weston_view::link is documented to be in weston_compositor::view_list,
    and weston_compositor::view_list is documented to contain weston_views.
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Yong Bakos <ybakos@humanoriented.com>
    Reviewed-by: Armin Krezović <krezovic.armin@gmail.com>
    [Pekka: removed also the other "Must be NULL" comment.]

diff --git a/src/compositor.h b/src/compositor.h
index a95f05d..91d1a22 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -754,7 +754,7 @@ struct weston_compositor {
 	struct wl_list output_list;
 	struct wl_list seat_list;
 	struct wl_list layer_list;
-	struct wl_list view_list;
+	struct wl_list view_list;	/* struct weston_view::link */
 	struct wl_list plane_list;
 	struct wl_list key_binding_list;
 	struct wl_list modifier_binding_list;
@@ -890,7 +890,7 @@ struct weston_view {
 	struct wl_list surface_link;
 	struct wl_signal destroy_signal;
 
-	struct wl_list link;
+	struct wl_list link;             /* weston_compositor::view_list */
 	struct weston_layer_entry layer_link; /* part of geometry */
 	struct weston_plane *plane;
 
@@ -951,7 +951,6 @@ struct weston_view {
 	/*
 	 * Which output to vsync this surface to.
 	 * Used to determine, whether to send or queue frame events.
-	 * Must be NULL, if 'link' is not in weston_compositor::surface_list.
 	 */
 	struct weston_output *output;
 
@@ -1021,7 +1020,6 @@ struct weston_surface {
 	/*
 	 * Which output to vsync this surface to.
 	 * Used to determine, whether to send or queue frame events.
-	 * Must be NULL, if 'link' is not in weston_compositor::surface_list.
 	 */
 	struct weston_output *output;
 

commit 901ac32d9ab674a614ad53f2b5af21b0ffebe9b5
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Date:   Fri May 13 14:07:20 2016 +0300

    eventdemo: use %u for uint32_t printing
    
    I was confused why timestamp was printed negative. This fixes it, and
    others while at it.
    
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Reviewed-by: Benoit Gschwind <gschwind@gnu-log.net>

diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index 64b3d01..f04e39b 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -206,7 +206,7 @@ key_handler(struct window *window, struct input *input, uint32_t time,
 	if (!log_key)
 		return;
 
-	printf("key key: %d, unicode: %d, state: %s, modifiers: 0x%x\n",
+	printf("key key: %u, unicode: %u, state: %s, modifiers: 0x%x\n",
 	       key, unicode,
 	       (state == WL_KEYBOARD_KEY_STATE_PRESSED) ? "pressed" :
 							  "released",
@@ -235,7 +235,7 @@ button_handler(struct widget *widget, struct input *input, uint32_t time,
 	e->print_pointer_frame = true;
 
 	input_get_position(input, &x, &y);
-	printf("button time: %d, button: %d, state: %s, x: %d, y: %d\n",
+	printf("button time: %u, button: %u, state: %s, x: %d, y: %d\n",
 	       time, button,
 	       (state == WL_POINTER_BUTTON_STATE_PRESSED) ? "pressed" :
 							    "released",
@@ -262,7 +262,7 @@ axis_handler(struct widget *widget, struct input *input, uint32_t time,
 
 	e->print_pointer_frame = true;
 
-	printf("axis time: %d, axis: %s, value: %f\n",
+	printf("axis time: %u, axis: %s, value: %f\n",
 	       time,
 	       axis == WL_POINTER_AXIS_VERTICAL_SCROLL ? "vertical" :
 							 "horizontal",
@@ -322,7 +322,7 @@ axis_stop_handler(struct widget *widget, struct input *input,
 		return;
 
 	e->print_pointer_frame = true;


Reply to: