.gitignore | 1 Makefile.am | 22 clients/clickdot.c | 50 clients/cliptest.c | 398 --- clients/desktop-shell.c | 50 clients/dnd.c | 26 clients/editor.c | 18 clients/eventdemo.c | 42 clients/flower.c | 4 clients/fullscreen.c | 34 clients/gears.c | 25 clients/image.c | 8 clients/multi-resource.c | 2 clients/nested.c | 16 clients/resizor.c | 3 clients/scaler.c | 15 clients/simple-damage.c | 880 ++++++++ clients/simple-egl.c | 102 clients/simple-shm.c | 29 clients/smoke.c | 4 clients/stacking.c | 11 clients/subsurfaces.c | 4 clients/terminal.c | 105 - clients/transformed.c | 3 clients/weston-info.c | 89 clients/weston-simple-im.c | 22 clients/window.c | 384 ++- clients/window.h | 20 clients/wscreensaver.c | 8 configure.ac | 17 debian/changelog | 8 debian/control | 2 debian/patches/0001-Require-libinput-0.4.0.patch | 94 debian/patches/0001-animation-fix-move-scale-animation.patch | 107 - debian/patches/0001-exposay-fix-crash-when-navigating-with-the-keyboard.patch | 34 debian/patches/0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch | 99 debian/patches/series | 4 desktop-shell/exposay.c | 8 desktop-shell/input-panel.c | 8 desktop-shell/shell.c | 1027 ++++++---- desktop-shell/shell.h | 9 fullscreen-shell/fullscreen-shell.c | 4 m4/.gitignore | 5 man/weston.ini.man | 63 protocol/desktop-shell.xml | 25 protocol/scaler.xml | 2 protocol/xdg-shell.xml | 225 -- releasing.txt | 43 shared/cairo-util.c | 8 shared/cairo-util.h | 9 shared/config-parser.c | 12 shared/config-parser.h | 3 shared/frame.c | 38 shared/image-loader.c | 14 shared/option-parser.c | 97 src/animation.c | 16 src/compositor-drm.c | 43 src/compositor-rdp.c | 156 + src/compositor-wayland.c | 42 src/compositor-x11.c | 5 src/compositor.c | 703 ++++-- src/compositor.h | 183 - src/data-device.c | 48 src/gl-renderer.c | 2 src/input.c | 159 + src/libinput-device.c | 169 + src/libinput-seat.c | 36 src/pixman-renderer.c | 11 src/screen-share.c | 55 src/screenshooter.c | 14 src/spring-tool.c | 5 src/text-backend.c | 11 src/vertex-clipping.c | 12 src/weston-egl-ext.h | 8 tests/bad-buffer-test.c | 35 tests/matrix-test.c | 4 tests/subsurface-test.c | 40 tests/weston-test-client-helper.c | 57 tests/weston-test-client-helper.h | 10 tests/weston-test.c | 11 tests/weston-tests-env | 2 weston.ini.in | 10 xwayland/launcher.c | 12 xwayland/window-manager.c | 52 84 files changed, 4108 insertions(+), 2143 deletions(-)
New commits: commit 299b847c37f53ff01d4a4dae73c55b9b6d935777 Author: Héctor Orón Martínez <zu...@debian.org> Date: Fri Sep 12 18:29:49 2014 +0200 d/changelog: update Signed-off-by: Héctor Orón Martínez <zu...@debian.org> diff --git a/debian/changelog b/debian/changelog index a9a125e..157a7a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +weston (1.5.93-1) UNRELEASED; urgency=medium + + * New upstream development release. + * d/patches/*: drop them. + * d/control: bump build depend on libinput-dev. + + -- Hector Oron <zu...@debian.org> Fri, 12 Sep 2014 18:28:31 +0200 + weston (1.5.0-3) unstable; urgency=medium * d/p/0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch, commit 2bf1ccb91970b5c8dce96a9a526939d7ebc9cdaf Author: Héctor Orón Martínez <zu...@debian.org> Date: Fri Sep 12 18:28:15 2014 +0200 d/control: bump libinput-dev build depend Signed-off-by: Héctor Orón Martínez <zu...@debian.org> diff --git a/debian/control b/debian/control index 3df1bc8..ece452e 100644 --- a/debian/control +++ b/debian/control @@ -39,7 +39,7 @@ Build-Depends: libpam0g-dev, libvpx-dev, libsystemd-login-dev, - libinput-dev (>= 0.5.0), + libinput-dev (>= 0.6.0), Standards-Version: 3.9.5 Homepage: http://wayland.freedesktop.org/ Vcs-Git: git://anonscm.debian.org/pkg-xorg/wayland/weston commit 13f9f88095af1bc227712e1dad15c199c5147d94 Author: Héctor Orón Martínez <zu...@debian.org> Date: Fri Sep 12 18:25:43 2014 +0200 d/patches: drop Signed-off-by: Héctor Orón Martínez <zu...@debian.org> diff --git a/debian/patches/0001-Require-libinput-0.4.0.patch b/debian/patches/0001-Require-libinput-0.4.0.patch deleted file mode 100644 index 145d44e..0000000 --- a/debian/patches/0001-Require-libinput-0.4.0.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 3b843d3a61286d4b2a9552a3a2cae80c6b1cf8cd Mon Sep 17 00:00:00 2001 -From: Peter Hutterer <peter.hutte...@who-t.net> -Date: Wed, 25 Jun 2014 14:07:36 +1000 -Subject: [PATCH] Require libinput 0.4.0 - -No functional changes, just adjusting for API changes in libinput: -- libinput_destroy() replaced by libinput_unref() -- log functions now take a libinput context, userdata is gone -- udev seat creation is now libinput_udev_create_context() and - libinput_udev_assign_seat() - -Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> ---- - configure.ac | 2 +- - src/libinput-seat.c | 32 +++++++++++++++++++++----------- - 2 files changed, 22 insertions(+), 12 deletions(-) - ---- a/configure.ac -+++ b/configure.ac -@@ -159,7 +159,7 @@ - AM_CONDITIONAL([ENABLE_LIBINPUT_BACKEND], [test x$enable_libinput_backend = xyes]) - if test x$enable_libinput_backend = xyes; then - AC_DEFINE([BUILD_LIBINPUT_BACKEND], [1], [Build the libinput input device backend]) -- PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.3.0]) -+ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.4.0]) - fi - - ---- a/src/libinput-seat.c -+++ b/src/libinput-seat.c -@@ -252,8 +252,9 @@ - } - - static void --libinput_log_func(enum libinput_log_priority priority, void *user_data, -- const char *format, va_list args) -+libinput_log_func(struct libinput *libinput, -+ enum libinput_log_priority priority, -+ const char *format, va_list args) - { - weston_vlog(format, args); - } -@@ -268,25 +269,34 @@ - - input->compositor = c; - -- libinput_log_set_handler(&libinput_log_func, NULL); -- - log_priority = getenv("WESTON_LIBINPUT_LOG_PRIORITY"); - -+ input->libinput = libinput_udev_create_context(&libinput_interface, -+ input, udev); -+ if (!input->libinput) { -+ return -1; -+ } -+ -+ libinput_log_set_handler(input->libinput, &libinput_log_func); -+ - if (log_priority) { - if (strcmp(log_priority, "debug") == 0) { -- libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_DEBUG); -+ libinput_log_set_priority(input->libinput, -+ LIBINPUT_LOG_PRIORITY_DEBUG); - } else if (strcmp(log_priority, "info") == 0) { -- libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_INFO); -+ libinput_log_set_priority(input->libinput, -+ LIBINPUT_LOG_PRIORITY_INFO); - } else if (strcmp(log_priority, "error") == 0) { -- libinput_log_set_priority(LIBINPUT_LOG_PRIORITY_ERROR); -+ libinput_log_set_priority(input->libinput, -+ LIBINPUT_LOG_PRIORITY_ERROR); - } - } - -- input->libinput = libinput_udev_create_for_seat(&libinput_interface, input, -- udev, seat_id); -- if (!input->libinput) { -+ if (libinput_udev_assign_seat(input->libinput, seat_id) != 0) { -+ libinput_unref(input->libinput); - return -1; - } -+ - process_events(input); - - return udev_input_enable(input); -@@ -300,7 +310,7 @@ - wl_event_source_remove(input->libinput_source); - wl_list_for_each_safe(seat, next, &input->compositor->seat_list, base.link) - udev_seat_destroy(seat); -- libinput_destroy(input->libinput); -+ libinput_unref(input->libinput); - } - - static void diff --git a/debian/patches/0001-animation-fix-move-scale-animation.patch b/debian/patches/0001-animation-fix-move-scale-animation.patch deleted file mode 100644 index b80cd6a..0000000 --- a/debian/patches/0001-animation-fix-move-scale-animation.patch +++ /dev/null @@ -1,107 +0,0 @@ -X-Account-Key: account4 -X-UIDL: GmailId14625b19ac69bf2a -X-Mozilla-Status: 0001 -X-Mozilla-Status2: 00000000 -X-Mozilla-Keys: -Delivered-To: poch...@gmail.com -Received: by 10.60.170.229 with SMTP id ap5csp204557oec; - Thu, 22 May 2014 13:48:55 -0700 (PDT) -X-Received: by 10.66.121.197 with SMTP id lm5mr241537pab.118.1400791735070; - Thu, 22 May 2014 13:48:55 -0700 (PDT) -Return-Path: <wayland-devel-boun...@lists.freedesktop.org> -Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) - by mx.google.com with ESMTP id db3si1084263pbb.85.2014.05.22.13.48.54 - for <multiple recipients>; - Thu, 22 May 2014 13:48:55 -0700 (PDT) -Received-SPF: none (google.com: wayland-devel-boun...@lists.freedesktop.org does not designate permitted sender hosts) client-ip=131.252.210.177; -Authentication-Results: mx.google.com; - spf=neutral (google.com: wayland-devel-boun...@lists.freedesktop.org does not designate permitted sender hosts) smtp.mail=wayland-devel-boun...@lists.freedesktop.org; - dkim=neutral (body hash did not verify) header.i=@ -Received: from gabe.freedesktop.org (localhost [127.0.0.1]) - by gabe.freedesktop.org (Postfix) with ESMTP id 316386ECFF; - Thu, 22 May 2014 13:48:51 -0700 (PDT) -X-Original-To: wayland-de...@lists.freedesktop.org -Delivered-To: wayland-de...@lists.freedesktop.org -Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com - [66.111.4.27]) - by gabe.freedesktop.org (Postfix) with ESMTP id 2BA236E4A3 - for <wayland-de...@lists.freedesktop.org>; - Thu, 22 May 2014 13:48:49 -0700 (PDT) -Received: from compute2.internal (compute2.nyi.mail.srv.osa [10.202.2.42]) - by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 64F902146D; - Thu, 22 May 2014 16:41:48 -0400 (EDT) -Received: from frontend2 ([10.202.2.161]) - by compute2.internal (MEProxy); Thu, 22 May 2014 16:41:48 -0400 -DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= - messagingengine.com; h=from:to:cc:subject:date:message-id - :in-reply-to:references; s=smtpout; bh=xZJ7s9hNabCm1ID+8F4d8krGs - TY=; b=drH3dbtPBvoT4yYkFzVo4TiQuEuQBc8bydv20xxsLDlg0fkFtMaz269TV - xsaAMu6uGPwCKup2xwOtKVUFtPwv/hqoLrgqmQ+Qas6qSVl/LMma5fOzN+BDbzjX - v00ES7HaFZ+nsM1X4ZUPf9Ls9daw3aYqtULp7QbZ657x7QeVQY= -X-Sasl-enc: B8P/k2jTwz7A//gn0Vb9pYsonoiwfFBl9LPBBjIF7NSy 1400791307 -Received: from localhost.localdomain (unknown [151.27.142.237]) - by mail.messagingengine.com (Postfix) with ESMTPA id B00B1680118; - Thu, 22 May 2014 16:41:47 -0400 (EDT) -From: Jonny Lamb <jonny.l...@collabora.co.uk> -To: wayland-de...@lists.freedesktop.org -Subject: [PATCH weston 1/5] animation: fix move scale animation -Date: Thu, 22 May 2014 22:41:30 +0200 -Message-Id: <1400791294-31869-2-git-send-email-jonny.l...@collabora.co.uk> -X-Mailer: git-send-email 2.0.0.rc2 -In-Reply-To: <1400791294-31869-1-git-send-email-jonny.l...@collabora.co.uk> -References: <1400791294-31869-1-git-send-email-jonny.l...@collabora.co.uk> -Cc: Jonny Lamb <jonny.l...@collabora.co.uk> -X-BeenThere: wayland-de...@lists.freedesktop.org -X-Mailman-Version: 2.1.15 -Precedence: list -List-Id: Discussion about the wayland display server - <wayland-devel.lists.freedesktop.org> -List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/wayland-devel>, - <mailto:wayland-devel-requ...@lists.freedesktop.org?subject=unsubscribe> -List-Archive: <http://lists.freedesktop.org/archives/wayland-devel> -List-Post: <mailto:wayland-de...@lists.freedesktop.org> -List-Help: <mailto:wayland-devel-requ...@lists.freedesktop.org?subject=help> -List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/wayland-devel>, - <mailto:wayland-devel-requ...@lists.freedesktop.org?subject=subscribe> -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Errors-To: wayland-devel-boun...@lists.freedesktop.org -Sender: "wayland-devel" <wayland-devel-boun...@lists.freedesktop.org> - -Both weston_move_scale_run() and weston_slide_run() were broken in -commit 3a869019. Commit a4a6f161 fixed and explained the problem for -weston_slide_run() but weston_move_scale_run() remained broken. - -To fix weston_move_scale_run(), weston_view_animation_run() is also -required. It was removed when _run() was split into two functions -_create() and _run() in commit f5cc2b56, but _run() was not added in -this commit. ---- - src/animation.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/animation.c b/src/animation.c -index a29b34a..392e32d 100644 ---- a/src/animation.c -+++ b/src/animation.c -@@ -458,8 +458,10 @@ weston_move_scale_run(struct weston_view *view, int dx, int dy, - if (animation == NULL) - return NULL; - -- weston_spring_init(&animation->spring, 400.0, start, end); -+ weston_spring_init(&animation->spring, 400.0, 0.0, 1.0); - animation->spring.friction = 1150; - -+ weston_view_animation_run(animation); -+ - return animation; - } --- -2.0.0.rc2 - -_______________________________________________ -wayland-devel mailing list -wayland-de...@lists.freedesktop.org -http://lists.freedesktop.org/mailman/listinfo/wayland-devel - diff --git a/debian/patches/0001-exposay-fix-crash-when-navigating-with-the-keyboard.patch b/debian/patches/0001-exposay-fix-crash-when-navigating-with-the-keyboard.patch deleted file mode 100644 index 9ffa9a2..0000000 --- a/debian/patches/0001-exposay-fix-crash-when-navigating-with-the-keyboard.patch +++ /dev/null @@ -1,34 +0,0 @@ -From e608cd67218fdaa0405df306f84883ed114f86db Mon Sep 17 00:00:00 2001 -From: Emilio Pozuelo Monfort <emilio.pozu...@collabora.co.uk> -Date: Sat, 24 May 2014 02:38:56 +0200 -Subject: [PATCH weston] exposay: fix crash when navigating with the keyboard - -Commit a7592019 introduced an optimization that caused some -exposay struct members to not be properly initialized, particularly -cur_output, leading to crashes in some circumstances (e.g. pressing -the down arrow key after going to exposay). - -Signed-off-by: Emilio Pozuelo Monfort <emilio.pozu...@collabora.co.uk> ---- - desktop-shell/exposay.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c -index 1d8b40e..104b9d9 100644 ---- a/desktop-shell/exposay.c -+++ b/desktop-shell/exposay.c -@@ -323,8 +323,10 @@ exposay_layout(struct desktop_shell *shell, struct shell_output *shell_output) - i++; - } - -- if (highlight) -+ if (highlight) { -+ shell->exposay.focus_current = NULL; - exposay_highlight_surface(shell, highlight); -+ } - - weston_compositor_schedule_repaint(shell->compositor); - --- -2.0.0.rc2 - diff --git a/debian/patches/0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch b/debian/patches/0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch deleted file mode 100644 index 59ae545..0000000 --- a/debian/patches/0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 26714b4718ec877418c9a8faa111d8b9def7b0a1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jad...@gmail.com> -Date: Mon, 2 Jun 2014 23:15:48 +0200 -Subject: [PATCH] libinput: Use floating point instead of fixed point numbers -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Also update configure.ac to require libinput 0.3 when enabled, as it is -the version where double replaced li_fixed_t. - -Signed-off-by: Jonas Ådahl <jad...@gmail.com> ---- - configure.ac | 2 +- - src/libinput-device.c | 27 ++++++++++++++++++--------- - 2 files changed, 19 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index e2bf38d..16e813d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -159,7 +159,7 @@ AC_ARG_ENABLE(libinput-backend, [ --enable-libinput-backend],, - AM_CONDITIONAL([ENABLE_LIBINPUT_BACKEND], [test x$enable_libinput_backend = xyes]) - if test x$enable_libinput_backend = xyes; then - AC_DEFINE([BUILD_LIBINPUT_BACKEND], [1], [Build the libinput input device backend]) -- PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.1.0]) -+ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.3.0]) - fi - - -diff --git a/src/libinput-device.c b/src/libinput-device.c -index 4605a76..2ba4ec3 100644 ---- a/src/libinput-device.c -+++ b/src/libinput-device.c -@@ -73,11 +73,14 @@ handle_pointer_motion(struct libinput_device *libinput_device, - { - struct evdev_device *device = - libinput_device_get_user_data(libinput_device); -+ wl_fixed_t dx, dy; - -+ dx = wl_fixed_from_double(libinput_event_pointer_get_dx(pointer_event)); -+ dy = wl_fixed_from_double(libinput_event_pointer_get_dy(pointer_event)); - notify_motion(device->seat, - libinput_event_pointer_get_time(pointer_event), -- libinput_event_pointer_get_dx(pointer_event), -- libinput_event_pointer_get_dy(pointer_event)); -+ dx, -+ dy); - } - - static void -@@ -99,10 +102,12 @@ handle_pointer_motion_absolute( - width = device->output->current_mode->width; - height = device->output->current_mode->height; - -- x = libinput_event_pointer_get_absolute_x_transformed(pointer_event, -- width); -- y = libinput_event_pointer_get_absolute_y_transformed(pointer_event, -- height); -+ x = wl_fixed_from_double( -+ libinput_event_pointer_get_absolute_x_transformed(pointer_event, -+ width)); -+ y = wl_fixed_from_double( -+ libinput_event_pointer_get_absolute_y_transformed(pointer_event, -+ height)); - - weston_output_transform_coordinate(device->output, x, y, &x, &y); - notify_motion_absolute(device->seat, time, x, y); -@@ -127,11 +132,13 @@ handle_pointer_axis(struct libinput_device *libinput_device, - { - struct evdev_device *device = - libinput_device_get_user_data(libinput_device); -+ double value; - -+ value = libinput_event_pointer_get_axis_value(pointer_event); - notify_axis(device->seat, - libinput_event_pointer_get_time(pointer_event), - libinput_event_pointer_get_axis(pointer_event), -- libinput_event_pointer_get_axis_value(pointer_event)); -+ wl_fixed_from_double(value)); - } - - static void -@@ -155,8 +162,10 @@ handle_touch_with_coords(struct libinput_device *libinput_device, - - width = device->output->current_mode->width; - height = device->output->current_mode->height; -- x = libinput_event_touch_get_x_transformed(touch_event, width); -- y = libinput_event_touch_get_y_transformed(touch_event, height); -+ x = wl_fixed_from_double( -+ libinput_event_touch_get_x_transformed(touch_event, width)); -+ y = wl_fixed_from_double( -+ libinput_event_touch_get_y_transformed(touch_event, height)); - - weston_output_transform_coordinate(device->output, - x, y, &x, &y); --- -2.1.0 - diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 48b8c79..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,4 +0,0 @@ -0001-animation-fix-move-scale-animation.patch -0001-exposay-fix-crash-when-navigating-with-the-keyboard.patch -0001-libinput-Use-floating-point-instead-of-fixed-point-n.patch -0001-Require-libinput-0.4.0.patch commit f1d2cc0d149cb84006dc26fddd0142b7180f7c34 Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Fri Sep 12 12:45:08 2014 +0300 configure.ac: bump version 1.5.93 for rc2 Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/configure.ac b/configure.ac index 7506ecd..4a889af 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ m4_define([weston_major_version], [1]) m4_define([weston_minor_version], [5]) -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 eb4fd3527809b9133caeb09833798d132467bf07 Author: Pekka Paalanen <pekka.paala...@collabora.co.uk> Date: Fri Sep 12 12:07:43 2014 +0300 libinput: default to INFO log level Set the default logging level from libinput to INFO. This matches better the behaviour of the old input backend, and prints the found input devices into Weston's log. Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> Acked-by: Jonas Ådahl <jad...@gmail.com> diff --git a/src/libinput-seat.c b/src/libinput-seat.c index 09cf7c7..ef2d804 100644 --- a/src/libinput-seat.c +++ b/src/libinput-seat.c @@ -260,9 +260,10 @@ libinput_log_func(struct libinput *libinput, } int -udev_input_init(struct udev_input *input, struct weston_compositor *c, struct udev *udev, - const char *seat_id) +udev_input_init(struct udev_input *input, struct weston_compositor *c, + struct udev *udev, const char *seat_id) { + enum libinput_log_priority priority = LIBINPUT_LOG_PRIORITY_INFO; const char *log_priority = NULL; memset(input, 0, sizeof *input); @@ -281,17 +282,16 @@ udev_input_init(struct udev_input *input, struct weston_compositor *c, struct ud if (log_priority) { if (strcmp(log_priority, "debug") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_DEBUG); + priority = LIBINPUT_LOG_PRIORITY_DEBUG; } else if (strcmp(log_priority, "info") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_INFO); + priority = LIBINPUT_LOG_PRIORITY_INFO; } else if (strcmp(log_priority, "error") == 0) { - libinput_log_set_priority(input->libinput, - LIBINPUT_LOG_PRIORITY_ERROR); + priority = LIBINPUT_LOG_PRIORITY_ERROR; } } + libinput_log_set_priority(input->libinput, priority); + if (libinput_udev_assign_seat(input->libinput, seat_id) != 0) { libinput_unref(input->libinput); return -1; commit c996f1d8bdb6b8d77d18d40b401861a07d340817 Author: Jonas Ådahl <jad...@gmail.com> Date: Thu Sep 11 23:35:58 2014 +0200 libinput-device: Don't get initial key states Initial key state is no pressed keys, and the libinput_device_get_keys function was deprecated in libinput 0.6.0. Signed-off-by: Jonas Ådahl <jad...@gmail.com> diff --git a/src/libinput-device.c b/src/libinput-device.c index 7643899..0e3f46d 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -468,42 +468,12 @@ void evdev_notify_keyboard_focus(struct weston_seat *seat, struct wl_list *evdev_devices) { - struct evdev_device *device; struct wl_array keys; - unsigned int i, set; - char evdev_keys[(KEY_CNT + 7) / 8]; - char all_keys[(KEY_CNT + 7) / 8]; - uint32_t *k; - int ret; if (!seat->keyboard_device_count > 0) return; - memset(all_keys, 0, sizeof all_keys); - wl_list_for_each(device, evdev_devices, link) { - memset(evdev_keys, 0, sizeof evdev_keys); - ret = libinput_device_get_keys(device->device, - evdev_keys, - sizeof evdev_keys); - if (ret < 0) { - weston_log("failed to get keys for device %s\n", - device->devnode); - continue; - } - for (i = 0; i < ARRAY_LENGTH(evdev_keys); i++) - all_keys[i] |= evdev_keys[i]; - } - wl_array_init(&keys); - for (i = 0; i < KEY_CNT; i++) { - set = all_keys[i >> 3] & (1 << (i & 7)); - if (set) { - k = wl_array_add(&keys, sizeof *k); - *k = i; - } - } - notify_keyboard_focus_in(seat, &keys, STATE_UPDATE_AUTOMATIC); - wl_array_release(&keys); } commit 3fbba493d5732f9feb5a7956cb98d6eb5f0ff363 Author: Peter Hutterer <peter.hutte...@who-t.net> Date: Tue Sep 9 13:02:25 2014 +1000 libinput: normalize WL_CALIBRATION before passing it to libinput WL_CALIBRATION, introduced in weston-1.1, requires the translation component of the calibration matrix to be in screen coordinates. libinput does not have access to this and it's not a very generic way to do this anyway. So with the libinput backend, WL_CALIBRATION support is currently broken (#82742). This cannot be fixed in libinput without changing its API for this specific use-case. This patch lets weston take care of WL_CALIBRATION. It takes the original format and normalizes it before passing it to libinput. This way libinput still does the coordinate transformation, weston just needs to provide the initial configuration. Note that this needs an updated libinput, otherwise libinput will try to transform coordinates as well. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=82742 Reviewed-by: Jonas Ådahl <jad...@gmail.com> Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/configure.ac b/configure.ac index 2a60ff8..7506ecd 100644 --- a/configure.ac +++ b/configure.ac @@ -160,7 +160,7 @@ AC_ARG_ENABLE(libinput-backend, [ --disable-libinput-backend],, AM_CONDITIONAL([ENABLE_LIBINPUT_BACKEND], [test x$enable_libinput_backend = xyes]) if test x$enable_libinput_backend = xyes; then AC_DEFINE([BUILD_LIBINPUT_BACKEND], [1], [Build the libinput input device backend]) - PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.5.0]) + PKG_CHECK_MODULES(LIBINPUT_BACKEND, [libinput >= 0.6.0]) fi diff --git a/src/libinput-device.c b/src/libinput-device.c index 6e50eeb..7643899 100644 --- a/src/libinput-device.c +++ b/src/libinput-device.c @@ -282,6 +282,90 @@ notify_output_destroy(struct wl_listener *listener, void *data) } } +/** + * The WL_CALIBRATION property requires a pixel-specific matrix to be + * applied after scaling device coordinates to screen coordinates. libinput + * can't do that, so we need to convert the calibration to the normalized + * format libinput expects. + */ +static void +evdev_device_set_calibration(struct evdev_device *device) +{ + struct udev *udev; + struct udev_device *udev_device = NULL; + const char *sysname = libinput_device_get_sysname(device->device); + const char *calibration_values; + uint32_t width, height; + float calibration[6]; + enum libinput_config_status status; + + if (!device->output) + return; + + width = device->output->width; + height = device->output->height; + if (width == 0 || height == 0) + return; + + /* If libinput has a pre-set calibration matrix, don't override it */ + if (!libinput_device_config_calibration_has_matrix(device->device) || + libinput_device_config_calibration_get_default_matrix( + device->device, + calibration) != 0) + return; + + udev = udev_new(); + if (!udev) + return; + + udev_device = udev_device_new_from_subsystem_sysname(udev, + "input", + sysname); + if (!udev_device) + goto out; + + calibration_values = + udev_device_get_property_value(udev_device, + "WL_CALIBRATION"); + + if (!calibration_values || sscanf(calibration_values, + "%f %f %f %f %f %f", + &calibration[0], + &calibration[1], + &calibration[2], + &calibration[3], + &calibration[4], + &calibration[5]) != 6) + goto out; + + weston_log("Applying calibration: %f %f %f %f %f %f " + "(normalized %f %f)\n", + calibration[0], + calibration[1], + calibration[2], + calibration[3], + calibration[4], + calibration[5], + calibration[2] / width, + calibration[5] / height); + + /* normalize to a format libinput can use. There is a chance of + this being wrong if the width/height don't match the device + width/height but I'm not sure how to fix that */ + calibration[2] /= width; + calibration[5] /= height; + + status = libinput_device_config_calibration_set_matrix(device->device, + calibration); + if (status != LIBINPUT_CONFIG_STATUS_SUCCESS) + weston_log("Failed to apply calibration.\n"); + +out: + if (udev_device) + udev_device_unref(udev_device); + udev_unref(udev); +} + void evdev_device_set_output(struct evdev_device *device, struct weston_output *output) @@ -295,6 +379,7 @@ evdev_device_set_output(struct evdev_device *device, device->output_destroy_listener.notify = notify_output_destroy; wl_signal_add(&output->destroy_signal, &device->output_destroy_listener); + evdev_device_set_calibration(device); } static void @@ -318,6 +403,8 @@ configure_device(struct evdev_device *device) libinput_device_config_tap_set_enabled(device->device, enable_tap); } + + evdev_device_set_calibration(device); } struct evdev_device * commit 03db71caea98f8a2c5d302763289495ea2b30596 Author: Ondřej Majerech <majerec...@gmail.com> Date: Thu Sep 11 15:53:15 2014 +0200 compositor: Don't free an uninitialised pointer. When backend_init returns NULL, we goto out_signals, which wants to free(modules), but in this particular code path, modules hasn't been initialised leading to a "Double-free or corruption" error message. Initialising modules to NULL makes the free a no-op in this scenario. Signed-off-by: Ondřej Majerech <majerec...@gmail.com> Reviewed-by: Ryo Munakata <ryomnk...@gmail.com> diff --git a/src/compositor.c b/src/compositor.c index b0bc86c..a219766 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -4335,7 +4335,8 @@ int main(int argc, char *argv[]) int i, fd; char *backend = NULL; char *shell = NULL; - char *modules, *option_modules = NULL; + char *modules = NULL; + char *option_modules = NULL; char *log = NULL; char *server_socket = NULL, *end; int32_t idle_time = 300; commit 5e3b693a117e227e21df1826fcfe4baf2e01c08a Author: Bill Spitzak <spit...@gmail.com> Date: Tue Aug 19 18:13:11 2014 -0700 image: don't print redundant error This error is printed by load_image() now Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/clients/image.c b/clients/image.c index 573117c..aee8112 100644 --- a/clients/image.c +++ b/clients/image.c @@ -373,7 +373,6 @@ image_create(struct display *display, const char *filename, image->image = load_cairo_surface(filename); if (!image->image) { - fprintf(stderr, "could not find the image %s!\n", b); free(image->filename); free(image); return NULL; commit 28371f7d55ba3468bd3baa06cbab9c82b4842ade Author: Bill Spitzak <spit...@gmail.com> Date: Tue Aug 19 18:13:10 2014 -0700 load_image: always print a message on failure if filename is not empty It was rather inconsistent before. This may help users figure out why backgrounds and icons don't show up. A better api where the error can be queried might be nice, but this seems sufficient for current Weston use. [Pekka Paalanen: removed one stray space.] Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/shared/image-loader.c b/shared/image-loader.c index 35dadd3..c4d763f 100644 --- a/shared/image-loader.c +++ b/shared/image-loader.c @@ -23,6 +23,7 @@ #include "config.h" +#include <errno.h> #include <stdlib.h> #include <stdio.h> #include <string.h> @@ -374,12 +375,18 @@ load_image(const char *filename) FILE *fp; unsigned int i; + if (!filename || !*filename) + return NULL; + fp = fopen(filename, "rb"); - if (fp == NULL) + if (!fp) { + fprintf(stderr, "%s: %s\n", filename, strerror(errno)); return NULL; + } if (fread(header, sizeof header, 1, fp) != 1) { fclose(fp); + fprintf(stderr, "%s: unable to read file header\n", filename); return NULL; } @@ -395,10 +402,13 @@ load_image(const char *filename) fclose(fp); if (i == ARRAY_LENGTH(loaders)) { - fprintf(stderr, "unrecognized file header for %s: " + fprintf(stderr, "%s: unrecognized file header " "0x%02x 0x%02x 0x%02x 0x%02x\n", filename, header[0], header[1], header[2], header[3]); image = NULL; + } else if (!image) { + /* load probably printed something, but just in case */ + fprintf(stderr, "%s: error reading image\n", filename); } return image; commit 3011493e9b57d558f700367a8a20afd4c1b54711 Author: Bill Spitzak <spit...@gmail.com> Date: Tue Aug 19 18:13:09 2014 -0700 parse_options: fail on more malformed options Fail on trailing text after numbers, such as --width=100mm Fail on any text after booleans, such as --flag=false Also fixed reading of memory after the null terminator of a long option with no = sign in it. [Pekka Paalanen: some whitespace style fixes.] Signed-off-by: Pekka Paalanen <pekka.paala...@collabora.co.uk> diff --git a/shared/option-parser.c b/shared/option-parser.c index c00349a..7061268 100644 --- a/shared/option-parser.c +++ b/shared/option-parser.c @@ -30,53 +30,94 @@ #include "config-parser.h" -static void +static int handle_option(const struct weston_option *option, char *value) { + char* p; + switch (option->type) { case WESTON_OPTION_INTEGER: - * (int32_t *) option->data = strtol(value, NULL, 0); - return; + * (int32_t *) option->data = strtol(value, &p, 0); + return *value && !*p; case WESTON_OPTION_UNSIGNED_INTEGER: - * (uint32_t *) option->data = strtoul(value, NULL, 0); - return; + * (uint32_t *) option->data = strtoul(value, &p, 0); + return *value && !*p; case WESTON_OPTION_STRING: * (char **) option->data = strdup(value); - return; - case WESTON_OPTION_BOOLEAN: - * (int32_t *) option->data = 1; - return; + return 1; default: assert(0); } } +static int +long_option(const struct weston_option *options, int count, char *arg) +{ + int k, len; + + for (k = 0; k < count; k++) { + if (!options[k].name) + continue; + + len = strlen(options[k].name); + if (strncmp(options[k].name, arg + 2, len) != 0) + continue; + + if (options[k].type == WESTON_OPTION_BOOLEAN) { + if (!arg[len + 2]) { + * (int32_t *) options[k].data = 1; + + return 1; + } + } else if (arg[len+2] == '=') { + return handle_option(options + k, arg + len + 3); + } + } + + return 0; +} + +static int +short_option(const struct weston_option *options, int count, char *arg) +{ + int k; + + if (!arg[1]) + return 0; + + for (k = 0; k < count; k++) { -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/e1xstjw-00081a...@moszumanska.debian.org