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

weston: Changes to 'debian-unstable'



 .gitignore                        |    3 
 Makefile.am                       |    5 
 clients/.gitignore                |    5 
 clients/Makefile.am               |   32 
 clients/calibrator.c              |  260 ++++
 clients/clickdot.c                |    2 
 clients/cliptest.c                |    2 
 clients/desktop-shell.c           |    9 
 clients/dnd.c                     |    2 
 clients/editor.c                  |  852 ++++++++++------
 clients/eventdemo.c               |    6 
 clients/flower.c                  |   11 
 clients/gears.c                   |    2 
 clients/image.c                   |    3 
 clients/keyboard.c                |  367 +++++-
 clients/resizor.c                 |    2 
 clients/screenshot.c              |    9 
 clients/simple-egl.c              |   25 
 clients/simple-shm.c              |  119 +-
 clients/simple-touch.c            |    8 
 clients/smoke.c                   |    2 
 clients/tablet-shell.c            |    5 
 clients/terminal.c                |    6 
 clients/transformed.c             |  299 +++++
 clients/view.c                    |    5 
 clients/weston-info.c             |    8 
 clients/weston-simple-im.c        |  514 +++++++++
 clients/window.c                  | 1338 +++++++++++++++++--------
 clients/window.h                  |   46 
 clients/wscreensaver.c            |    6 
 configure.ac                      |  142 ++
 debian/changelog                  |    7 
 debian/rules                      |    2 
 debian/weston.install             |    6 
 man/.gitignore                    |    1 
 man/Makefile.am                   |    1 
 man/weston.ini.man                |   10 
 man/weston.man                    |    8 
 protocol/desktop-shell.xml        |   18 
 protocol/input-method.xml         |   93 +
 protocol/text-cursor-position.xml |   11 
 protocol/text.xml                 |  167 ++-
 shared/config-parser.h            |   10 
 shared/image-loader.c             |    1 
 shared/matrix.c                   |  271 +++++
 shared/matrix.h                   |   82 +
 shared/option-parser.c            |    5 
 src/.gitignore                    |    1 
 src/Makefile.am                   |  133 ++
 src/android-framebuffer.cpp       |   93 -
 src/android-framebuffer.h         |   54 -
 src/animation.c                   |  290 +++++
 src/bindings.c                    |  292 +++++
 src/compositor-android.c          |  510 ---------
 src/compositor-drm.c              | 1357 ++++++++++++-------------
 src/compositor-fbdev.c            |  927 +++++++++++++++++
 src/compositor-headless.c         |  212 +++
 src/compositor-rdp.c              | 1039 +++++++++++++++++++
 src/compositor-rpi.c              | 1575 +++++++++++++++++++++++++++++
 src/compositor-wayland.c          |  327 ++----
 src/compositor-x11.c              |  517 +++++++--
 src/compositor.c                  | 1044 +++++++++++++------
 src/compositor.h                  |  246 ++--
 src/evdev-touchpad.c              |   19 
 src/evdev.c                       |   55 -
 src/evdev.h                       |    6 
 src/gl-renderer.c                 | 2016 ++++++++++++++++++++++++++++++++++++++
 src/gl-renderer.h                 |  106 +
 src/gles2-renderer.c              | 1307 ------------------------
 src/libbacklight.c                |    9 
 src/matrix.c                      |  250 ----
 src/matrix.h                      |   64 -
 src/noop-renderer.c               |   98 +
 src/pixman-renderer.c             |  605 +++++++++++
 src/pixman-renderer.h             |   35 
 src/rpi-bcm-stubs.h               |  267 +++++
 src/screenshooter.c               |   48 
 src/shell.c                       |  950 +++++++++++++----
 src/tablet-shell.c                |   15 
 src/text-backend.c                |  478 ++++++++-
 src/udev-seat.c                   |  298 +++++
 src/udev-seat.h                   |   45 
 src/util.c                        |  521 ---------
 src/version.h.in                  |   31 
 src/weston-egl-ext.h              |    4 
 src/weston-launch.c               |   43 
 src/weston.pc.in                  |   11 
 src/xwayland/Makefile.am          |    2 
 src/xwayland/launcher.c           |  106 +
 src/xwayland/selection.c          |    2 
 src/xwayland/window-manager.c     |  283 ++++-
 src/xwayland/xwayland.h           |   12 
 src/zoom.c                        |    3 
 tests/.gitignore                  |    1 
 tests/Makefile.am                 |   28 
 tests/event-test.c                |   69 +
 tests/matrix-test.c               |    2 
 tests/setbacklight.c              |    2 
 tests/surface-global-test.c       |    3 
 tests/surface-test.c              |    3 
 tests/text-test.c                 |   67 -
 tests/weston-test-client-helper.c |   73 -
 tests/weston-test-client-helper.h |    9 
 tests/weston-test.c               |   27 
 tests/weston-tests-env            |    6 
 tests/xwayland-test.c             |  142 ++
 weston.ini                        |   58 +
 107 files changed, 15856 insertions(+), 5728 deletions(-)

New commits:
commit 0c1e9d5bdb039a43e039d532e47814be99a2f9c0
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Mon Jun 24 18:22:18 2013 +0200

    Install new files into weston
    
    Not sure if there should be a weston-dev package for the headers and
    the pkg-config file.

diff --git a/debian/weston.install b/debian/weston.install
index 74c0ff7..60a5c93 100644
--- a/debian/weston.install
+++ b/debian/weston.install
@@ -3,11 +3,17 @@ usr/bin/weston
 usr/bin/weston-info
 usr/bin/weston-launch
 usr/bin/weston-terminal
+usr/include/weston
 usr/lib/*/weston-tablet-shell
 usr/lib/*/weston-desktop-shell
+usr/lib/*/weston-keyboard
 usr/lib/*/weston-screenshooter
+usr/lib/*/weston-simple-im
+usr/lib/*/pkgconfig/weston.pc
 usr/lib/*/weston/desktop-shell.so
 usr/lib/*/weston/drm-backend.so
+usr/lib/*/weston/fbdev-backend.so
+usr/lib/*/weston/headless-backend.so
 usr/lib/*/weston/tablet-shell.so
 usr/lib/*/weston/wayland-backend.so
 usr/lib/*/weston/x11-backend.so

commit d2bd643082af7e82a97c0d8ddb17013f25ba7576
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Mon Jun 24 18:17:58 2013 +0200

    Restore protocol/text-cursor-position.xml from upstream
    
    While this file is not in the 1.1.1 tarball, it is needed for building
    from git:
    
    make[3]: *** No rule to make target `text-cursor-position-server-protocol.h', needed by `all'.  Stop.

diff --git a/protocol/text-cursor-position.xml b/protocol/text-cursor-position.xml
new file mode 100644
index 0000000..0fbc54e
--- /dev/null
+++ b/protocol/text-cursor-position.xml
@@ -0,0 +1,11 @@
+<protocol name="text_cursor_position">
+
+  <interface name="text_cursor_position" version="1">
+    <request name="notify">
+      <arg name="surface" type="object" interface="wl_surface"/>
+      <arg name="x" type="fixed"/>
+      <arg name="y" type="fixed"/>
+    </request>
+  </interface>
+
+</protocol>

commit 67b362dd1e7c0376a9063e7513b90deeac10a8cf
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Mon Jun 24 18:15:44 2013 +0200

    Configure with --disable-libunwind
    
    Currently there is no libunwind.pc in the Debian libunwind packages,
    and without it, `configure' fails.

diff --git a/debian/changelog b/debian/changelog
index 38a785c..65c0207 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
 weston (1.1.1-1) UNRELEASED; urgency=low
 
+  [ Timo Aaltonen ]
   * New upstream release.
   * Add a watch file.
   * control: Add missing build-depends: libmtdev-dev, libxcursor-dev,
@@ -16,6 +17,10 @@ weston (1.1.1-1) UNRELEASED; urgency=low
   * Add README.source.
   * patches/series: Add a placeholder file.
 
+  [ Sven Joachim ]
+  * Configure with --disable-libunwind until libunwind starts shipping
+    pkg-config files (see #711854).
+
  -- Timo Aaltonen <tjaalton@ubuntu.com>  Thu, 16 Aug 2012 20:52:23 +0300
 
 weston (0.85.0-1) experimental; urgency=low
diff --git a/debian/rules b/debian/rules
index 40abf6c..a2043e2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 
 override_dh_auto_configure:
-	dh_auto_configure -- --disable-setuid-install
+	dh_auto_configure -- --disable-setuid-install --disable-libunwind
 
 override_dh_auto_test:
 	# the test suite does not 100% pass in headless mode

commit 927412be10e1c6ab82afd9b6355ae3196f709f42
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Mon Jun 24 18:15:00 2013 +0200

    New upstream release

diff --git a/debian/changelog b/debian/changelog
index 18f96a3..38a785c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-weston (1.0.5-1) UNRELEASED; urgency=low
+weston (1.1.1-1) UNRELEASED; urgency=low
 
   * New upstream release.
   * Add a watch file.

commit b22b21f13f379e3de7d82ea45a4a69d085dc8ede
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri Jun 7 01:52:08 2013 -0400

    configure.ac: Bump version to 1.1.1

diff --git a/configure.ac b/configure.ac
index ed6d2ee..06d0b4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([weston_major_version], [1])
 m4_define([weston_minor_version], [1])
-m4_define([weston_micro_version], [0])
+m4_define([weston_micro_version], [1])
 m4_define([weston_version],
           [weston_major_version.weston_minor_version.weston_micro_version])
 

commit 747d4ee17e573766a0b46b60db9b2477b9286d27
Author: Sinclair Yeh <sinclair.yeh@intel.com>
Date:   Thu Jun 6 16:41:30 2013 -0700

    Avoid unnecessarily re-allocating texture buffer when the size hasn't changed.
    
    v4:
    Incorporated krh and anderco's comments.  Now adding newly allocated
    buffer's dimensions to texture_damage
    
    v3:
    * Removed unnecessary parentheses
    * Added check for switching from EGL image to SHM buffer
    * Moved shader assignment out of IF condition
    
    v2:
    Fixed the wrong comparison
    
    v1:
    Depending on specific DRI driver implementation, glTexImage2D() with data
    set to NULL may or may not re-allocate the texture buffer each time it is
    called.  Unintended consequences happen if later glTexSubImage2D() is called
    to only update a sub-region of the texture buffer.
    
    I've explored moving glTexImage2D() from gl_renderer_attach() and simply
    mark the texture dirty, but the current implemention seems cleaner because
    I won't have to worry about calling ensure_textures() and re-assigning
    gs->shader unnecessarily.

diff --git a/src/gl-renderer.c b/src/gl-renderer.c
index ea6631f..f6c7194 100644
--- a/src/gl-renderer.c
+++ b/src/gl-renderer.c
@@ -66,6 +66,7 @@ struct gl_surface_state {
 	int num_images;
 
 	struct weston_buffer_reference buffer_ref;
+	int height;
 	int pitch; /* in pixels */
 };
 
@@ -1192,14 +1193,28 @@ gl_renderer_attach(struct weston_surface *es, struct wl_buffer *buffer)
 	}
 
 	if (wl_buffer_is_shm(buffer)) {
-		gs->pitch = wl_shm_buffer_get_stride(buffer) / 4;
-		gs->target = GL_TEXTURE_2D;
+		/* Only allocate a texture if it doesn't match existing one.
+		 * If gs->num_images is not 0, then a switch from DRM allocated
+		 * buffer to a SHM buffer is happening, and we need to allocate
+		 * a new texture buffer. */
+		if (wl_shm_buffer_get_stride(buffer) / 4 != gs->pitch ||
+		    wl_shm_buffer_get_height(buffer) != gs->height ||
+		    gs->num_images > 0) {
+			gs->pitch = wl_shm_buffer_get_stride(buffer) / 4;
+			gs->height = wl_shm_buffer_get_height(buffer);
+			gs->target = GL_TEXTURE_2D;
+
+			ensure_textures(gs, 1);
+			glBindTexture(GL_TEXTURE_2D, gs->textures[0]);
+			glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT,
+				     gs->pitch, buffer->height, 0,
+				     GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
+			pixman_region32_union_rect(&gs->texture_damage,
+						   &gs->texture_damage,
+						   0, 0,
+						   gs->pitch, gs->height);
+		}
 
-		ensure_textures(gs, 1);
-		glBindTexture(GL_TEXTURE_2D, gs->textures[0]);
-		glTexImage2D(GL_TEXTURE_2D, 0, GL_BGRA_EXT,
-			     gs->pitch, buffer->height, 0,
-			     GL_BGRA_EXT, GL_UNSIGNED_BYTE, NULL);
 		if (wl_shm_buffer_get_format(buffer) == WL_SHM_FORMAT_XRGB8888)
 			gs->shader = &gr->texture_shader_rgbx;
 		else
@@ -1258,6 +1273,7 @@ gl_renderer_attach(struct weston_surface *es, struct wl_buffer *buffer)
 		}
 
 		gs->pitch = buffer->width;
+		gs->height = wl_shm_buffer_get_height(buffer);
 	} else {
 		weston_log("unhandled buffer type!\n");
 		weston_buffer_reference(&gs->buffer_ref, NULL);

commit 7583aff275ccbe0c4d6bb37ec9343773d119e18a
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue Jun 4 16:24:05 2013 +0300

    compositor-drm: Force DPMS state to ON after drmModeSetCrtc()
    
    The kernel is supposed to set this when drmModeSetCrtc() is called but
    at least the i915 driver wouldn't do that in all cases. A fix for this
    should be released with kernel 3.10, but we work around the issue in
    older kernels by always forcing DPMS to ON when doing a mode set.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=64873

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index bc68a6b..b3cf9a9 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -568,6 +568,7 @@ drm_output_repaint(struct weston_output *output_base,
 			weston_log("set mode failed: %m\n");
 			return;
 		}
+		output_base->set_dpms(output_base, WESTON_DPMS_ON);
 	}
 
 	if (drmModePageFlip(compositor->drm.fd, output->crtc_id,

commit ba4e929fc3cf4a726c41c756347e3f7ec95f2e31
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue Jun 4 16:24:04 2013 +0300

    compositor-drm: Cache the DPMS property on drm_output
    
    This avoids one drmModeGetConnector() call every time the DPMS mode is
    set. That call can take hundreds of milliseconds due to DDC.

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 8cb9649..bc68a6b 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -146,6 +146,7 @@ struct drm_output {
 	int pipe;
 	uint32_t connector_id;
 	drmModeCrtcPtr original_crtc;
+	drmModePropertyPtr dpms_prop;
 
 	int vblank_pending;
 	int page_flip_pending;
@@ -1029,6 +1030,8 @@ drm_output_destroy(struct weston_output *output_base)
 	if (output->backlight)
 		backlight_destroy(output->backlight);
 
+	drmModeFreeProperty(output->dpms_prop);
+
 	/* Turn off hardware cursor */
 	drmModeSetCursor(c->drm.fd, output->crtc_id, 0, 0, 0);
 
@@ -1341,23 +1344,12 @@ drm_set_dpms(struct weston_output *output_base, enum dpms_enum level)
 	struct drm_output *output = (struct drm_output *) output_base;
 	struct weston_compositor *ec = output_base->compositor;
 	struct drm_compositor *c = (struct drm_compositor *) ec;
-	drmModeConnectorPtr connector;
-	drmModePropertyPtr prop;
 
-	connector = drmModeGetConnector(c->drm.fd, output->connector_id);
-	if (!connector)
+	if (!output->dpms_prop)
 		return;
 
-	prop = drm_get_prop(c->drm.fd, connector, "DPMS");
-	if (!prop) {
-		drmModeFreeConnector(connector);
-		return;
-	}
-
-	drmModeConnectorSetProperty(c->drm.fd, connector->connector_id,
-				    prop->prop_id, level);
-	drmModeFreeProperty(prop);
-	drmModeFreeConnector(connector);
+	drmModeConnectorSetProperty(c->drm.fd, output->connector_id,
+				    output->dpms_prop->prop_id, level);
 }
 
 static const char *connector_type_names[] = {
@@ -1554,6 +1546,7 @@ create_output_for_connector(struct drm_compositor *ec,
 	ec->connector_allocator |= (1 << output->connector_id);
 
 	output->original_crtc = drmModeGetCrtc(ec->drm.fd, output->crtc_id);
+	output->dpms_prop = drm_get_prop(ec->drm.fd, connector, "DPMS");
 
 	/* Get the current mode on the crtc that's currently driving
 	 * this connector. */

commit 6737d1c0524bcb1ad1cb5d838b745ead5abb7bbf
Author: Rob Bradford <rob@linux.intel.com>
Date:   Tue Jun 4 13:23:01 2013 +0100

    build: Add declaration checks to check for required syscall flags
    
    The required flags are relatively new and some older enterprise
    distributions do not feature them.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=63360

diff --git a/configure.ac b/configure.ac
index d5fea9d..ed6d2ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,6 +39,15 @@ AC_CHECK_FUNC([dlopen], [],
               AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
 AC_SUBST(DLOPEN_LIBS)
 
+AC_CHECK_DECL(SFD_CLOEXEC,[],
+	      [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")],
+	      [[#include <sys/signalfd.h>]])
+AC_CHECK_DECL(TFD_CLOEXEC,[],
+	      [AC_MSG_ERROR("TFD_CLOEXEC is needed to compile weston")],
+	      [[#include <sys/timerfd.h>]])
+AC_CHECK_DECL(CLOCK_MONOTONIC,[],
+	      [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile weston")],
+	      [[#include <time.h>]])
 AC_CHECK_HEADERS([execinfo.h])
 
 AC_CHECK_FUNCS([mkostemp strchrnul])

commit 98be20f0deedcc9173ebb2d709a9676680e030a8
Author: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Date:   Mon Jun 3 12:24:09 2013 -0300

    weston.pc: Added libexecdir and pkglibexecdir variables
    
    These can be used by external clients to check the installation path
    
    Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>

diff --git a/src/weston.pc.in b/src/weston.pc.in
index 537cc89..828cb1f 100644
--- a/src/weston.pc.in
+++ b/src/weston.pc.in
@@ -2,6 +2,8 @@ prefix=@prefix@
 exec_prefix=@exec_prefix@
 libdir=@libdir@
 includedir=@includedir@
+libexecdir=@libexecdir@
+pkglibexecdir=${libexecdir}/@PACKAGE@
 
 Name: Weston Plugin API
 Description: Header files for Weston plugin development

commit 3331ee8d8e2c7f436c281f201226a50d5de96f42
Author: Rob Bradford <rob@linux.intel.com>
Date:   Mon Jun 3 18:46:13 2013 +0100

    udev-seat: Fail input setup only if no devices are found
    
    Rather than failing if we cannot open any single device fail the input
    setup if there are no input devices added.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=64506

diff --git a/src/udev-seat.c b/src/udev-seat.c
index bdd3ef5..6992f8a 100644
--- a/src/udev-seat.c
+++ b/src/udev-seat.c
@@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
 	fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK);
 	if (fd < 0) {
 		weston_log("opening input device '%s' failed.\n", devnode);
-		return -1;
+		return 0;
 	}
 
 	device = evdev_device_create(&master->base, devnode, fd);
@@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master)
 	} else if (device == NULL) {
 		close(fd);
 		weston_log("failed to create input device '%s'.\n", devnode);
-		return -1;
+		return 0;
 	}
 
 	calibration_values =
@@ -140,6 +140,7 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev)
 			"\t- seats misconfigured "
 			"(Weston backend option 'seat', "
 			"udev device property ID_SEAT)\n");
+		return -1;
 	}
 
 	return 0;

commit 47ba3a0f117c3f32da674f630969736078b36ac1
Author: U. Artie Eoff <ullysses.a.eoff@intel.com>
Date:   Mon Jun 3 16:22:31 2013 -0700

    use _exit instead of exit if client fails to exec
    
    exit() calls atexit() handlers and C++ destructors (e.g. a C++
    weston module) which could destroy state that the main process
    depends on (e.g. ioctl's, tmpfiles, sockets, etc...).  If an exec
    fails, call _exit() instead of exit().
    
    v2: prefer _exit over _Exit
    
    Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>

diff --git a/src/compositor.c b/src/compositor.c
index 693df2c..447a1c5 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -217,7 +217,7 @@ weston_client_launch(struct weston_compositor *compositor,
 
 	if (pid == 0) {
 		child_client_exec(sv[1], path);
-		exit(-1);
+		_exit(-1);
 	}
 
 	close(sv[1]);

commit 8d7562e47b4e3710bae9378c0900df319850b916
Author: Alexander Larsson <alexl@redhat.com>
Date:   Tue May 28 16:23:35 2013 +0200

    compositor-x11: Set original mode after current
    
    Otherwise we're pointing the original mode on some uninitialized
    value.

diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index eb6e58b..e893136 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -779,7 +779,6 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
 	if (fullscreen)
 		x11_output_wait_for_map(c, output);
 
-	output->base.origin = output->base.current;
 	output->base.start_repaint_loop = x11_output_start_repaint_loop;
 	if (c->use_pixman)
 		output->base.repaint = x11_output_repaint_shm;
@@ -791,6 +790,7 @@ x11_compositor_create_output(struct x11_compositor *c, int x, int y,
 	output->base.set_dpms = NULL;
 	output->base.switch_mode = NULL;
 	output->base.current = &output->mode;
+	output->base.origin = output->base.current;
 	output->base.make = "xwayland";
 	output->base.model = "none";
 	weston_output_init(&output->base, &c->base,

commit 0d78b9aa87544f99c9e9a24455e7cd27436b787d
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu May 23 20:30:26 2013 -0400

    compositor: Make backlight_current int32_t to avoid unsigned overflow
    
    Backlight brightness was wrapping around when decrementing from 0.

diff --git a/src/compositor.h b/src/compositor.h
index 1e999a6..2ab1e69 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -194,7 +194,7 @@ struct weston_output {
 	int (*switch_mode)(struct weston_output *output, struct weston_mode *mode);
 
 	/* backlight values are on 0-255 range, where higher is brighter */
-	uint32_t backlight_current;
+	int32_t backlight_current;
 	void (*set_backlight)(struct weston_output *output, uint32_t value);
 	void (*set_dpms)(struct weston_output *output, enum dpms_enum level);
 };

commit 275481d59df2ab43218e29acfb7ddf3145c1c4a0
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu May 23 20:29:40 2013 -0400

    compositor-drm: Log failure and which backlight sysfs file we're using

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 8f263a1..8cb9649 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1657,8 +1657,12 @@ create_output_for_connector(struct drm_compositor *ec,
 	output->backlight = backlight_init(drm_device,
 					   connector->connector_type);
 	if (output->backlight) {
+		weston_log("Initialized backlight, device %s\n",
+			   output->backlight->path);
 		output->base.set_backlight = drm_set_backlight;
 		output->base.backlight_current = drm_get_backlight(output);
+	} else {
+		weston_log("Failed to initialize backlight\n");
 	}
 
 	wl_list_insert(ec->base.output_list.prev, &output->base.link);

commit 698edf44ac9edbc0aca46f84e16676e9877a0980
Author: Rob Bradford <rob@linux.intel.com>
Date:   Mon May 20 16:55:10 2013 +0100

    weston-launch: Print explanation of why we failed to open the device

diff --git a/src/weston-launch.c b/src/weston-launch.c
index 64d4a8a..d034c58 100644
--- a/src/weston-launch.c
+++ b/src/weston-launch.c
@@ -318,12 +318,17 @@ handle_open(struct weston_launch *wl, struct msghdr *msg, ssize_t len)
 		goto err0;
 
 	fd = open(message->path, message->flags);
-	if (fd < 0)
+	if (fd < 0) {
+		fprintf(stderr, "Error opening device %s: %m\n",
+			message->path);
 		goto err0;
+	}
 
 	if (major(s.st_rdev) != INPUT_MAJOR) {
 		close(fd);
 		fd = -1;
+		fprintf(stderr, "Device %s is not an input device\n",
+			message->path);
 		goto err0;
 	}
 

commit 186775c4da1c6bec83827a638f7128cd69d3883a
Author: Dima Ryazanov <dima@gmail.com>
Date:   Mon May 13 23:51:11 2013 -0700

    Fix missing corner resize cursors in Kubuntu (oxy-white theme)
    
    Looks like that theme uses different names. Also, add the correspoding
    horizontal and vertical resize cursors, just for consistency.

diff --git a/clients/window.c b/clients/window.c
index 2540cc9..33787fd 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -1001,17 +1001,20 @@ shm_surface_create(struct display *display, struct wl_surface *wl_surface,
 
 static const char *bottom_left_corners[] = {
 	"bottom_left_corner",
-	"sw-resize"
+	"sw-resize",
+	"size_bdiag"
 };
 
 static const char *bottom_right_corners[] = {
 	"bottom_right_corner",
-	"se-resize"
+	"se-resize",
+	"size_fdiag"
 };
 
 static const char *bottom_sides[] = {
 	"bottom_side",
-	"s-resize"
+	"s-resize",
+	"size_ver"
 };
 
 static const char *grabbings[] = {
@@ -1029,27 +1032,32 @@ static const char *left_ptrs[] = {
 
 static const char *left_sides[] = {
 	"left_side",
-	"w-resize"
+	"w-resize",
+	"size_hor"
 };
 
 static const char *right_sides[] = {
 	"right_side",
-	"e-resize"
+	"e-resize",
+	"size_hor"
 };
 
 static const char *top_left_corners[] = {
 	"top_left_corner",
-	"nw-resize"
+	"nw-resize",
+	"size_fdiag"
 };
 
 static const char *top_right_corners[] = {
 	"top_right_corner",
-	"ne-resize"
+	"ne-resize",
+	"size_bdiag"
 };
 
 static const char *top_sides[] = {
 	"top_side",
-	"n-resize"
+	"n-resize",
+	"size_ver"
 };
 
 static const char *xterms[] = {

commit 9caf77bd921be3c7132f1cc958c93d704db10e9d
Author: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
Date:   Tue May 14 13:09:31 2013 -0300

    text: Respawn input method process if it exits
    
    Just the same as it is done in shell.c, if the input method process exits
    for any reason, we relaunch it automatically, as it is not possible to
    launch a standalone application outside of the weston process.
    
    In v2:
     - Proper error message when giving up.
    
    Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
    
    Conflicts:
    	src/text-backend.c

diff --git a/src/text-backend.c b/src/text-backend.c
index a92aebe..e5badc1 100644
--- a/src/text-backend.c
+++ b/src/text-backend.c
@@ -23,6 +23,8 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
+#include <time.h>
 
 #include "compositor.h"
 #include "text-server-protocol.h"
@@ -89,6 +91,9 @@ struct text_backend {
 		struct wl_resource *binding;
 		struct weston_process process;
 		struct wl_client *client;
+
+		unsigned deathcount;
+		uint32_t deathstamp;
 	} input_method;
 
 	struct wl_listener seat_created_listener;
@@ -761,14 +766,33 @@ input_method_init_seat(struct weston_seat *seat)
 	seat->input_method->focus_listener_initialized = 1;
 }
 
+static void launch_input_method(struct text_backend *text_backend);
+
 static void
 handle_input_method_sigchld(struct weston_process *process, int status)
 {
+	uint32_t time;
 	struct text_backend *text_backend =
 		container_of(process, struct text_backend, input_method.process);
 
 	text_backend->input_method.process.pid = 0;
 	text_backend->input_method.client = NULL;
+
+	/* if input_method dies more than 5 times in 10 seconds, give up */
+	time = weston_compositor_get_time();
+	if (time - text_backend->input_method.deathstamp > 10000) {
+		text_backend->input_method.deathstamp = time;
+		text_backend->input_method.deathcount = 0;
+	}
+
+	text_backend->input_method.deathcount++;
+	if (text_backend->input_method.deathcount > 5) {
+		weston_log("input_method died, giving up.\n");
+		return;
+	}
+
+	weston_log("input_method died, respawning...\n");
+	launch_input_method(text_backend);
 }
 
 static void

commit 504a780b15b3d723ae9b55f4012d2b404e793a65
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Date:   Tue May 7 14:16:59 2013 +0300

    compositor-drm: Don't page flip before a mode is set
    
    The function drm_output_start_repaint_loop() unconditionally issues a
    page flip, even if the crtc for that output has not been enabled yet.
    That causes the page flip to fail, and drm_output_repaint() is never
    called.
    
    Solve this by bypassing the initial page flip if the output needs a
    mode set.
    
    This has the caveat of affecting latency predictability for that first
    frame and when a "driver" mode fullscreen surface causes a mode set.
    However, on both cases the mode set would take an unpredictable amount
    of time anyway.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=63812
    https://bugs.freedesktop.org/show_bug.cgi?id=64183

diff --git a/src/Makefile.am b/src/Makefile.am
index d33ebc5..e391ecd 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -127,7 +127,7 @@ if ENABLE_DRM_COMPOSITOR
 drm_backend = drm-backend.la
 drm_backend_la_LDFLAGS = -module -avoid-version
 drm_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(DRM_COMPOSITOR_LIBS) \
-	../shared/libshared.la
+	../shared/libshared.la -lrt
 drm_backend_la_CFLAGS =				\
 	$(COMPOSITOR_CFLAGS)			\
 	$(DRM_COMPOSITOR_CFLAGS)		\
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 1b9dcd0..8f263a1 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -31,6 +31,7 @@
 #include <linux/input.h>
 #include <assert.h>
 #include <sys/mman.h>
+#include <time.h>
 
 #include <xf86drm.h>
 #include <xf86drmMode.h>
@@ -46,6 +47,10 @@
 #include "udev-seat.h"
 #include "launcher-util.h"
 
+#ifndef DRM_CAP_TIMESTAMP_MONOTONIC
+#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
+#endif
+
 static int option_current_mode = 0;
 static char *output_name;
 static char *output_mode;
@@ -108,6 +113,8 @@ struct drm_compositor {
 	int use_pixman;
 
 	uint32_t prev_state;
+
+	clockid_t clock;
 };
 
 struct drm_mode {
@@ -629,10 +636,19 @@ drm_output_start_repaint_loop(struct weston_output *output_base)
 		output_base->compositor;
 	uint32_t fb_id;
 
-	if (output->current)
-		fb_id = output->current->fb_id;
-	else
-		fb_id = output->original_crtc->buffer_id;
+	struct timespec ts;
+
+	if (!output->current) {
+		/* We can't page flip if there's no mode set */
+		uint32_t msec;
+
+		clock_gettime(compositor->clock, &ts);
+		msec = ts.tv_sec * 1000 + ts.tv_nsec / 1000000;
+		weston_output_finish_frame(output_base, msec);
+		return;
+	}
+
+	fb_id = output->current->fb_id;
 
 	if (drmModePageFlip(compositor->drm.fd, output->crtc_id, fb_id,
 			    DRM_MODE_PAGE_FLIP_EVENT, output) < 0) {
@@ -1151,7 +1167,8 @@ static int
 init_drm(struct drm_compositor *ec, struct udev_device *device)
 {
 	const char *filename, *sysnum;
-	int fd;
+	uint64_t cap;
+	int fd, ret;
 
 	sysnum = udev_device_get_sysnum(device);
 	if (sysnum)
@@ -1174,6 +1191,11 @@ init_drm(struct drm_compositor *ec, struct udev_device *device)
 
 	ec->drm.fd = fd;
 
+	ret = drmGetCap(fd, DRM_CAP_TIMESTAMP_MONOTONIC, &cap);
+	if (ret == 0 && cap == 1)
+		ec->clock = CLOCK_MONOTONIC;
+	else
+		ec->clock = CLOCK_REALTIME;
 
 	return 0;
 }

commit 5b65927f4f82504a424094dcae0bcaa1bccd7561
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Fri May 10 12:36:04 2013 -0400

    compositor-drm: Destroy sprites before destroying the outputs

diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 890eba7..1b9dcd0 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1968,12 +1968,12 @@ drm_destroy(struct weston_compositor *ec)
 	wl_event_source_remove(d->udev_drm_source);
 	wl_event_source_remove(d->drm_source);
 
+	destroy_sprites(d);
+
 	weston_compositor_shutdown(ec);
 
 	ec->renderer->destroy(ec);
 
-	destroy_sprites(d);
-
 	if (d->gbm)
 		gbm_device_destroy(d->gbm);
 

commit 310cee07ecdfa5ec8c3bd89a77becaea00f3b84c
Author: Kristian Høgsberg <krh@bitplanet.net>
Date:   Thu May 2 13:43:24 2013 -0400

    xwm: Reparent client windows into ARGB windows
    
    We used to rely on an ugly hack where the xwayland server would always
    report RGB X windows as having ARGB pixels, so that texturing from these
    would also sample the undefined alpha.  We also relied on Xrender rendering
    to RGB X windows to write the alpha channel correctly, so that when we
    texture from the RGB X window as an ARGB surface we end up getting the
    alpha written by Xrender.
    
    That was obviously all broken.  We can instead reparent client windows into
    ARGB frame windows.  That way we can render the decorations using a
    ARGB render pictformat and sample back those alpha values in a well-defined
    way.  We can also unbreak xwayland and let it report RGB pixel format for
    RGB windows.  We still need the opaque region or the RGB-only client window
    but that's OK.

diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 8f0a377..ccce277 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -648,7 +648,7 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event)
 	xcb_map_request_event_t *map_request =
 		(xcb_map_request_event_t *) event;
 	struct weston_wm_window *window;
-	uint32_t values[1];
+	uint32_t values[3];
 	int x, y, width, height;
 
 	if (our_resource(wm, map_request->window)) {
@@ -667,7 +667,8 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event)
 	weston_wm_window_get_frame_size(window, &width, &height);
 	weston_wm_window_get_child_position(window, &x, &y);
 
-	values[0] =
+	values[0] = wm->screen->black_pixel;
+	values[1] =
 		XCB_EVENT_MASK_KEY_PRESS |
 		XCB_EVENT_MASK_KEY_RELEASE |
 		XCB_EVENT_MASK_BUTTON_PRESS |
@@ -677,18 +678,22 @@ weston_wm_handle_map_request(struct weston_wm *wm, xcb_generic_event_t *event)
 		XCB_EVENT_MASK_LEAVE_WINDOW |


Reply to: