Re: [PATCH weston 0/3] Rework the launcher infrastructure

2015-06-25 Thread David Herrmann
ng that we're > opened on our own VT. > > There should not be any regressions in existing behavior. > > Cc: David Herrmann > Cc: Ray Strode > > Jasper St. Pierre (3): > launcher: Rename logind-util to launcher-logind > launcher: Split out launcher implementat

Re: [PATCH] compositor-fbdev: Wait and retry before failing on reconnect to the framebuffer

2015-05-15 Thread David Herrmann
Hi On Fri, May 15, 2015 at 4:44 PM, Derek Foreman wrote: > On 15/05/15 05:30 AM, David Herrmann wrote: >> systemd-logind listens to VT events via poll(2) on >> /sys/class/tty/tty0/active. On VT switches it changes ACL permissions >> on dev-nodes underneath /dev, if the 

Re: [PATCH] compositor-fbdev: Wait and retry before failing on reconnect to the framebuffer

2015-05-15 Thread David Herrmann
Hi On Fri, May 15, 2015 at 8:39 AM, Pekka Paalanen wrote: > > On Wed, 13 May 2015 21:43:39 -0400 > nerdopolis wrote: > > > Resolving https://bugs.freedesktop.org/show_bug.cgi?id=73782 > > udev might be configured to set the permissions on framebuffer devices with > > the UACCESS attribute. > >

Re: [PATCH libinput] Set O_CLOEXEC when opening devices

2015-04-30 Thread David Herrmann
Hi On Thu, Apr 30, 2015 at 6:43 PM, Derek Foreman wrote: > We'd rather keep these out of the hands of children. > > Signed-off-by: Derek Foreman > --- > src/evdev.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: David Herrmann Thanks Da

Re: [PATCH weston 2/2] input: Set CLOEXEC on all opened fds

2015-04-30 Thread David Herrmann
Hi On Thu, Apr 30, 2015 at 6:20 PM, Derek Foreman wrote: > We'd rather not have these fds available in all child processes, even > if using old versions of libinput that don't bother to set CLOEXEC > > Signed-off-by: Derek Foreman Reviewed-by: David Herrmann Than

Re: [PATCH weston 1/2] logind: actually close fd in weston_logind_close()

2015-04-30 Thread David Herrmann
Hi On Thu, Apr 30, 2015 at 6:20 PM, Derek Foreman wrote: > You had one job... > > Signed-off-by: Derek Foreman > --- > src/logind-util.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/src/logind-util.c b/src/logind-util.c > index e4e20eb..1327b48 100644 > --- a/src/logind-util.c > +

Re: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread David Herrmann
Hi On Wed, Apr 8, 2015 at 2:03 AM, Bryce Harrington wrote: > On Wed, Apr 01, 2015 at 08:10:44AM +0100, mateuszx.potr...@intel.com wrote: >> From: Mateusz Polrola >> >> After weston-launch is executing weston it cannot close TTY file, >> because it is still required to properly handle SIGUSR1 and

Re: [RFC v2 libinput 0/2] Buttonset interface - numbered axes

2015-03-19 Thread David Herrmann
Hi On Wed, Mar 18, 2015 at 7:58 AM, Peter Hutterer wrote: > > This is a re-vamped version of the buttonset interface. Still WIP but I'd > like to get some comments on the API. > > Changes to the last version: > This version now uses numbered axes instead of typed axes. Previously the > interface

[PATCH weston 4/4] logind: fix PropertiesChanged parser

2014-12-30 Thread David Herrmann
s in the future, we extract the 'Active' parser into a helper function parse_active(), which is then shared between the PropertiesChanged and Get handlers. Signed-off-by: David Herrmann --- src/logind-util.c | 56 +++ 1 file chan

[PATCH weston 1/4] logind: use SIGRTMIN to not conflict with xwayland

2014-12-30 Thread David Herrmann
logs). Signed-off-by: David Herrmann --- src/logind-util.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/logind-util.c b/src/logind-util.c index 554e64d..132a9a2 100644 --- a/src/logind-util.c +++ b/src/logind-util.c @@ -692,14 +6

[PATCH weston 3/4] logind: forward Active=true changes for non-DRM backends

2014-12-30 Thread David Herrmann
aedc7732ebd9bc7b4f51ee247ea857ffec6260a7 Author: David Herrmann Date: Sat Nov 30 11:25:45 2013 +0100 logind: delay wakeup until DRM-device is resumed However, the other compositor backends do not use DRM, so logind-util will never get notified about any DRM device. Therefore, we have to forward the

[PATCH weston 2/4] launcher: use SIGRTMIN to not conflict with xwayland

2014-12-30 Thread David Herrmann
logs). Signed-off-by: David Herrmann --- src/launcher-util.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/launcher-util.c b/src/launcher-util.c index ac764dc..ad81aef 100644 --- a/src/launcher-util.c +++ b/src/launcher-util.c @@ -342,9 +3

Re: [PATCH 1/1] weston-launch: alter tty command line parameter semantics

2014-12-16 Thread David Herrmann
Hi On Tue, Dec 16, 2014 at 9:19 AM, Daniel Stone wrote: >> I reasoned that user access to the tty should be set up by the kernel >> policies, and we should not enforce the policy at weston level. If the >> system is configured in this way, then a user with enough permissions can >> start up westo

Re: [PATCH] Fix bug https://bugs.freedesktop.org/show_bug.cgi?id=86889 by emitting session signals on TTY switches so that the weston backends can handle VT switching when not called from weston-launc

2014-12-15 Thread David Herrmann
sitor-drm was written (by relying on the DRM device to define session status). As that is non-trivial to change, logind-util.c syns session state with the master DRM device. I wrote a patch that should fix this issue for !DRM backends. I also attached the patch in case the inlined version is whites

Re: [PATCH v3 libinput] util: introduce ratelimit helpers

2014-11-06 Thread David Herrmann
Hi On Thu, Nov 6, 2014 at 11:39 PM, Peter Hutterer wrote: > From: David Herrmann > > This adds "struct ratelimit" and "ratelimit_test()". It's a very simple > rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. > > This comes

Re: [PATCH libinput v2 1/2] util: introduce ratelimit helpers

2014-11-06 Thread David Herrmann
Hi On Thu, Nov 6, 2014 at 6:51 AM, Peter Hutterer wrote: > On Wed, Nov 05, 2014 at 01:32:16PM +0100, David Herrmann wrote: >> diff --git a/test/misc.c b/test/misc.c >> index 1512180..aa411ec 100644 >> --- a/test/misc.c >> +++ b/test/misc.c >> @@ -508,6 +50

[PATCH libinput v2 2/2] evdev: ratelimit SYN_DROPPED logging

2014-11-05 Thread David Herrmann
Use the ratelimit helpers for SYN_DROPPED logging. This guarantees that we will still receive SYN_DROPPED log-messages after multiple days of runtime, even though there might have been a SYN_DROPPED flood at one point in time. Signed-off-by: David Herrmann --- src/evdev.c | 18

[PATCH libinput v2 1/2] util: introduce ratelimit helpers

2014-11-05 Thread David Herrmann
This adds "struct ratelimit" and "ratelimit_test()". It's a very simple rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. This comes in handy to limit log-messages in possible busy loops etc.. Signed-off-by: David Herrmann

Re: [PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-05 Thread David Herrmann
Hi On Wed, Nov 5, 2014 at 6:11 AM, Peter Hutterer wrote: > On Tue, Nov 04, 2014 at 09:35:37AM +0100, David Herrmann wrote: >> This adds "struct ratelimit" and "ratelimit_test()". It's a very simple >> rate-limit helper modeled after Linux' lib/ratelim

Re: [PATCH libinput v2] evdev: Log evdev event queue overflows

2014-11-04 Thread David Herrmann
Hi On Tue, Nov 4, 2014 at 12:17 AM, Peter Hutterer wrote: > On Mon, Nov 03, 2014 at 11:49:12AM +0100, David Herrmann wrote: >> Hi >> >> On Wed, Oct 29, 2014 at 3:56 PM, Derek Foreman >> wrote: >> > Log a message when the kernel event queue overflows a

Re: [PATCH libinput 0/4] some acceleration fixes, mostly for high DPI mice

2014-11-04 Thread David Herrmann
Hi On Tue, Nov 4, 2014 at 4:51 AM, Peter Hutterer wrote: > On Mon, Nov 03, 2014 at 11:56:59AM +0100, David Herrmann wrote: >> I haven't spent much time thinking it through, but so far I'd prefer a >> solid, but basic, heuristic to guess the DPI and then use hwdb for >

[PATCH libinput 2/2] evdev: ratelimit SYN_DROPPED logging

2014-11-04 Thread David Herrmann
Use the ratelimit helpers for SYN_DROPPED logging. This guarantees that we will still receive SYN_DROPPED log-messages after multiple days of runtime, even though there might have been a SYN_DROPPED flood at one point in time. Signed-off-by: David Herrmann --- src/evdev.c | 14

[PATCH libinput 1/2] util: introduce ratelimit helpers

2014-11-04 Thread David Herrmann
This adds "struct ratelimit" and "ratelimit_test()". It's a very simple rate-limit helper modeled after Linux' lib/ratelimit.c by Dave Young. This comes in handy to limit log-messages in possible busy loops etc.. Signed-off-by: David Herrmann

Re: [PATCH libinput 0/4] some acceleration fixes, mostly for high DPI mice

2014-11-03 Thread David Herrmann
Hi On Fri, Oct 31, 2014 at 5:33 AM, Peter Hutterer wrote: > On Thu, Oct 30, 2014 at 04:34:12PM -0500, Derek Foreman wrote: >> The acceleration filter currently isn't particularly pleased with gaming >> mice. >> >> They generally have high DPI (can be over 8000 DPI) and can have high update >> ra

Re: [PATCH libinput v2] evdev: Log evdev event queue overflows

2014-11-03 Thread David Herrmann
Hi On Wed, Oct 29, 2014 at 3:56 PM, Derek Foreman wrote: > Log a message when the kernel event queue overflows and events are dropped. > After 10 messages logging stops to avoid flooding the logs if the condition > is persistent. > --- > src/evdev.c | 11 +++ > src/evdev.h | 4 > 2

Re: [PATCH libxkbcommon 2/4] compose: add xkbcommon-compose - implementation

2014-09-15 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 1:58 PM, Ran Benita wrote: > On Mon, Sep 15, 2014 at 08:21:34AM +0200, David Herrmann wrote: >> Why don't we require a keymap in xkb_compose_state_new()? Should be >> easy to do and we can then track modifiers reliably. >> Ok, a keysym which i

Re: [PATCH libxkbcommon 1/4] compose: add xkbcommon-compose - API

2014-09-15 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 1:48 PM, Ran Benita wrote: > On Mon, Sep 15, 2014 at 08:41:37AM +0200, David Herrmann wrote: >> Hi > > Hi David > >> On Sun, Sep 14, 2014 at 11:05 PM, Ran Benita wrote: > [snip] >> > +/** >> > + * @page compose-cancella

Re: Weston and multiseat

2014-09-14 Thread David Herrmann
Hi On Mon, Sep 15, 2014 at 8:38 AM, Daniel J Blueman wrote: > Has anyone met success using Wayland (or any other compositors) > multi-seat with a single GPU (Intel in my case), eg booting linux-3.16 > with drm.rnodes=1? You cannot do this. DRM cards do not allow splitting modeset resources acros

Re: [PATCH libxkbcommon 1/4] compose: add xkbcommon-compose - API

2014-09-14 Thread David Herrmann
Hi On Sun, Sep 14, 2014 at 11:05 PM, Ran Benita wrote: > xkbcommon-compose is a Compose implementation for xkbcommon. It mostly > behaves like libX11's Compose, but the support is somewhat low-level and > is not transparent like in libX11. The user must add some supporting code > in order to util

Re: [PATCH libxkbcommon 2/4] compose: add xkbcommon-compose - implementation

2014-09-14 Thread David Herrmann
Hi On Sun, Sep 14, 2014 at 11:05 PM, Ran Benita wrote: > Signed-off-by: Ran Benita > --- [snip] > diff --git a/src/compose/state.c b/src/compose/state.c > new file mode 100644 > index 000..06e4ce5 > --- /dev/null > +++ b/src/compose/state.c > @@ -0,0 +1,196 @@ > +/* > + * Copyright © 2013

Re: [PATCH] Wrong bo handles can be referenced in func call, drmModeAddFB2 due to uninitialized array elements in handles[4]

2014-04-29 Thread David Herrmann
Hi On Tue, Apr 29, 2014 at 10:59 PM, Matt Roper wrote: > On Tue, Apr 29, 2014 at 01:24:31PM -0700, Kristian Høgsberg wrote: >> On Mon, Apr 28, 2014 at 03:26:18PM -0700, Dongwon Kim wrote: >> > Need all bo handles in the array, handles[4] to be initialized with >> > integer value that >> > indica

Re: [ANNOUNCE] libxkbcommon-0.4.1

2014-03-28 Thread David Herrmann
Hi On Thu, Mar 27, 2014 at 11:41 PM, Ran Benita wrote: > Regarding intended use-case for multiple-keysyms, I consider it mainly > to be for sequences with combining characters - not everything has > precomposed codepoints, so if you want one of these, you don't have a > way to do it with single-k

Re: [ANNOUNCE] libxkbcommon-0.4.1

2014-03-27 Thread David Herrmann
Hi On Thu, Mar 27, 2014 at 8:22 PM, Ran Benita wrote: > - Added two new functions, xkb_state_key_get_utf{8,32}(). They > combine the operations of xkb_state_key_get_syms() and > xkb_keysym_to_utf{8,32}(), and provide a nicer interface for it > (espcially for multiple-keysyms-per-level). Sl

Re: How synchronisation works in Framebuffer backend

2014-03-22 Thread David Herrmann
Hi On Sat, Mar 22, 2014 at 6:33 PM, Sannu K wrote: > Hi, > > I was going through weston's framebuffer backend code. It does not call > FBIO_WAITFORVSYNC ioctl. > http://cgit.freedesktop.org/wayland/weston/tree/src/compositor-fbdev.c#n188 > says that it is not used intentionally. In this case, how

Re: [RFC PATCH libinput] udev: add libinput_udev_rescan_devices()

2014-03-21 Thread David Herrmann
Hi On Fri, Mar 21, 2014 at 6:14 AM, Peter Hutterer wrote: > On Fri, Mar 21, 2014 at 12:27:45AM -0400, Jasper St. Pierre wrote: >> So you're saying that every time we're suspended, we simply throw out the >> entire context and drop all the devices on the floor, as if you just >> unplugged all of t

Re: [PATCH weston] weston-launch: Let the user use her real shell

2014-01-23 Thread David Herrmann
Hi On Fri, Jan 24, 2014 at 7:13 AM, Quentin Glidic wrote: > From: Quentin Glidic > > Signed-off-by: Quentin Glidic > --- > src/weston-launch.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) > > diff --git a/src/weston-launch.c b/src/weston-launch.c > index 56e22b1..fd04552

Re: Announcing Termistor, a drop-down, tabbed, terminal for Wayland

2013-12-27 Thread David Herrmann
Hi On Thu, Dec 26, 2013 at 10:47 PM, Giulio Camuffo wrote: > Hi all, > > I've finally found a way to squeeze good performances out of my > terminal embryo I've had for a few months, so I hereby announce the > birth of the first drop-down (optionally), tabbed, terminal for > Wayland! Obligatory sc

Re: [PATCH] logind: delay wakeup until DRM-device is resumed

2013-12-05 Thread David Herrmann
Hi On Tue, Dec 3, 2013 at 10:42 PM, Kristian Høgsberg wrote: > On Sat, Nov 30, 2013 at 2:25 AM, David Herrmann wrote: >> The logind API was designed to allow any kind of devices and any number of >> devices. It has no idea of "main DRM device" or similar. However, the

[PATCH] logind: delay wakeup until DRM-device is resumed

2013-11-30 Thread David Herrmann
The logind API was designed to allow any kind of devices and any number of devices. It has no idea of "main DRM device" or similar. However, the weston DRM backend was designed with a single DRM device as master. Therefore, we wake it up unconditionally on session-wakeup. But this may fail with log

[PATCH] logind: change to -1+errno

2013-11-21 Thread David Herrmann
Set errno and return -1 in public API calls like all other weston code does. Most systemd+dbus calls return negative error-codes instead of -1 and setting errno. Thus, we need to explicitly set errno before returning. Also note that we must set errno _after_ the cleanup path. Calling functions lik

Re: [PATCH] logind: Use dbus_bool_t for bool types in dbus calls

2013-11-20 Thread David Herrmann
ppens to me all the time. Reviewed-by: David Herrmann > --- > src/logind-util.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > David, > > This fixes a crash that Artie hit when testing this. Btw, did you get > a chance to update the logind error paths to

Re: [RFC] clients: add simple-dmabuf

2013-10-28 Thread David Herrmann
Hi Axel On Mon, Oct 28, 2013 at 12:34 AM, Axel Davy wrote: > > On 22/10/2013 17:23, David Herrmann wrote : > > Btw., I got this working with i915 by allowing GEM_OPEN/GEM_FLINK on > the render-node. So if someone else tests this, you might need the > same hacks. I will try t

Re: [PATCH 2/2] compositor: finish frame if redraw fails

2013-10-23 Thread David Herrmann
Hi On Tue, Oct 22, 2013 at 9:45 PM, Kristian Høgsberg wrote: > On Tue, Oct 22, 2013 at 05:11:26PM +0200, David Herrmann wrote: >> If we are about to finish a frame, but a redraw is pending and we let the >> compositor redraw, we need to check for errors. If the redraw fails and

Re: [RFC] clients: add simple-dmabuf

2013-10-22 Thread David Herrmann
Hi On Mon, Oct 21, 2013 at 11:32 PM, David Herrmann wrote: > simple-dmabuf is an example client which shows how to write wayland > clients that use render-nodes for hardware-accelerated rendering and pass > the buffer via dmabuf to the compositor. No mesa/EGL extensions are > needed

[PATCH 1/2] compositor-drm: finish frame if initial page-flip fails

2013-10-22 Thread David Herrmann
If the initial page-flip fails, immediately finish the frame to avoid being stuck in the given frame. We already do this if we have no fbo available. Now we do the same if the page-flip fails. --- src/compositor-drm.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff

[PATCH 2/2] compositor: finish frame if redraw fails

2013-10-22 Thread David Herrmann
If we are about to finish a frame, but a redraw is pending and we let the compositor redraw, we need to check for errors. If the redraw fails and the backend cannot schedule a page-flip, we need to finish the frame, anyway. All backends except DRM use a timer to schedule frames. Hence, they cannot

Re: [PATCH v2 4/4] launcher: add logind backend

2013-10-22 Thread David Herrmann
Hi On Tue, Oct 22, 2013 at 1:56 AM, Kristian Høgsberg wrote: > On Tue, Oct 22, 2013 at 12:28:09AM +0200, David Herrmann wrote: >> Instead of connecting to weston-launch from launcher-util, we now try to >> connect to logind first. If logind provides session-devices, we use them

[PATCH v2 4/4] launcher: add logind backend

2013-10-21 Thread David Herrmann
close(launcher->tty); + free(launcher); } diff --git a/src/launcher-util.h b/src/launcher-util.h index 9de5237..d5b2fc9 100644 --- a/src/launcher-util.h +++ b/src/launcher-util.h @@ -30,7 +30,8 @@ struct weston_launcher; struct weston_launcher * -weston_launcher_connect(struct weston_

[PATCH v2 3/4] launcher: add weston_launcher_close() dummy

2013-10-21 Thread David Herrmann
If you request a device via weston_launcher_open(), you should now release it via weston_launcher_close() instead of close(). This is currently not needed but will be required for logind devices. --- src/launcher-util.c | 6 ++ src/launcher-util.h | 3 +++ src/udev-seat.c | 15 ++

[PATCH v2 2/4] dbus: add dbus-match helpers

2013-10-21 Thread David Herrmann
These helpers simplify adding dbus-matches by allowing var-arg arguments to assemble the matching rules. --- src/dbus.c | 68 ++ src/dbus.h | 40 2 files changed, 108 insertions(+) diff --git a/src/db

[PATCH v2 1/4] Add optional dbus helpers

2013-10-21 Thread David Herrmann
+ git-version.h : .FORCE $(AM_V_GEN)(echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@-new; \ cmp -s $@ $@-new || cp $@-new $@;

[RFC] clients: add simple-dmabuf

2013-10-21 Thread David Herrmann
0,0 +1,675 @@ +/* + * Copyright © 2012-2013 David Herrmann + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright

[PATCH] event-loop: fix blocking timerfd read

2013-10-17 Thread David Herrmann
the read can currently fail is EINTR or invalid parameters. The latter cannot happen in our setup so ignore it. EINTR shouldn't happen as syscall-restart is the default behavior so we simply return if a user changed it. Better safe than sorry. Signed-off-by: David Herrmann --- src/event-l

Re: [PATCH 3/7] Make weston spawn weston-launch

2013-10-16 Thread David Herrmann
Hi On Tue, Oct 15, 2013 at 8:07 PM, Kristian Høgsberg wrote: > On Tue, Oct 15, 2013 at 02:29:58PM +0200, David Herrmann wrote: >> This is a rather complete rewrite of weston-launch. Instead of spawning >> weston from weston-launch, we do the inverse now. Whenever weston is &g

Re: [PATCH 7/7] launcher: add logind backend

2013-10-15 Thread David Herrmann
Hi On Tue, Oct 15, 2013 at 8:47 PM, Kristian Høgsberg wrote: > On Tue, Oct 15, 2013 at 02:30:02PM +0200, David Herrmann wrote: >> Instead of spawning weston-launch from the launcher-util, we now try to >> connect to logind first. If logind provides session-devices, we use them

[PATCH 7/7] launcher: add logind backend

2013-10-15 Thread David Herrmann
-util.h +++ b/src/launcher-util.h @@ -30,7 +30,8 @@ struct weston_launcher; struct weston_launcher * -weston_launcher_connect(struct weston_compositor *compositor, int tty); +weston_launcher_connect(struct weston_compositor *compositor, int tty, + const char *seat_id); void

[PATCH 5/7] dbus: add dbus-match helpers

2013-10-15 Thread David Herrmann
These helpers simplify adding dbus-matches by allowing var-arg arguments to assemble the matching rules. --- src/dbus.c | 68 ++ src/dbus.h | 40 2 files changed, 108 insertions(+) diff --git a/src/db

[PATCH 6/7] launcher: add weston_launcher_close() dummy

2013-10-15 Thread David Herrmann
If you request a device via weston_launcher_open(), you should now release it via weston_launcher_close() instead of close(). This is currently not needed but will be required for logind devices. --- src/launcher-util.c | 6 ++ src/launcher-util.h | 3 +++ src/udev-seat.c | 15 ++

[PATCH 4/7] Add optional dbus helpers

2013-10-15 Thread David Herrmann
+ git-version.h : .FORCE $(AM_V_GEN)(echo "#define BUILD_ID \"$(shell git --git-dir=$(top_srcdir)/.git describe --always --dirty) $(shell git --git-dir=$(top_srcdir)/.git log -1 --format='%s (%ci)')\"" > $@-new; \ cmp -s $@ $@-new || cp $@-new $@;

[PATCH 3/7] Make weston spawn weston-launch

2013-10-15 Thread David Herrmann
This is a rather complete rewrite of weston-launch. Instead of spawning weston from weston-launch, we do the inverse now. Whenever weston is spawned with a backend that uses launcher-util, we spawn weston-launch as child process. weston-launch still handles VT switching and open() for session-devic

[PATCH 2/7] fbdev: open launcher only once

2013-10-15 Thread David Herrmann
We currently call launcher_connect() twice, which is redundant and amazingly works (ugh?). Fix this and connect only once to the launcher. --- src/compositor-fbdev.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c in

[PATCH 1/7] evdev: release devices on read() error

2013-10-15 Thread David Herrmann
If read() fails without EAGAIN/EINTR, the device is very likely dead. However, we must not remove the device as it might be muted/revoked. So we simply remove the event-source to avoid polling the device and simply wait for the udev-remove signal now. Note that we cannot call evdev_device_destroy(

Re: [xkbcommon] Use an integer type for modifiers bit mask.

2013-10-04 Thread David Herrmann
Hi On Fri, Oct 4, 2013 at 2:34 PM, Daniel Stone wrote: > On 4 October 2013 13:09, Wander Lairson Costa > wrote: >> That's what the patch is about: avoid casts. Whenever you use a cast, >> you are giving up the help the compiler may give to you regarding >> invalid type conversions. So, I always

Re: [RFC DRAFT] graphics tablet protocol extension

2013-10-03 Thread David Herrmann
Hi Peter On Wed, Oct 2, 2013 at 11:13 PM, Peter Hutterer wrote: > On Wed, Oct 02, 2013 at 05:44:29PM +0200, David Herrmann wrote: >> Hi Peter >> >> On Fri, Sep 20, 2013 at 12:35 PM, Peter Hutterer >> > diff --git a/protocol/wayland.xml b/protocol/wayland.xml >

Re: [RFC DRAFT] graphics tablet protocol extension

2013-10-02 Thread David Herrmann
Hi Peter On Fri, Sep 20, 2013 at 12:35 PM, Peter Hutterer wrote: > I've been working on a protocol extension to support graphics tablets such > as the Wacom set of tablets, and I'm now at the stage where I'd like a few > comments. I was hoping that I'd get a full implementation before XDC but > u

Re: [RFC wayland] System compositor protocol

2013-08-27 Thread David Herrmann
Hi On Tue, Aug 27, 2013 at 9:16 PM, microcai wrote: > 2013/8/25 David Herrmann : [...] >> The idea behind a system-compositor was to provide a system daemon >> that runs _outside_ a session. Its sole responsibility is to control >> access to graphics and input hardware. So s

Re: [systemd-devel] [PATCH 00/10] Device Management for systemd-logind

2013-08-26 Thread David Herrmann
Hi On Mon, Aug 26, 2013 at 6:37 AM, Tom Gundersen wrote: > On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: >> logind itselfs takes care of revoking device access for inactive sessions >> (synchronized with session-switches!). It also tries to resume every device >&

Re: [RFC wayland] System compositor protocol

2013-08-26 Thread David Herrmann
Hi On Mon, Aug 26, 2013 at 10:48 AM, Cedric BAIL wrote: > Hello, > > Cedric Bail > > > On Aug 26, 2013 2:11 AM, "David Herrmann" wrote: >> >> Hi >> >> On Fri, Aug 23, 2013 at 11:55 PM, Jason Ekstrand >> wrote: >> > Hello All,

Re: [PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
Hi On Sun, Aug 25, 2013 at 5:17 PM, Tom Gundersen wrote: > Hi David, > > On Sun, Aug 25, 2013 at 8:46 PM, David Herrmann wrote: >> One important note is that delayed session-switching is meant for >> backwards compatibility. New compositors or other sessions should

Re: [RFC wayland] System compositor protocol

2013-08-25 Thread David Herrmann
Hi On Fri, Aug 23, 2013 at 11:55 PM, Jason Ekstrand wrote: > Hello All, > I am in the process of picking back up the old idea of system compositors. > I am not, at the moment, looking for a review of the code; simply a review > of the concept and the proposed protocol. If you would like to look

Re: [PATCH wayland-web] building: Recommend disabling setuid for non-root installs

2013-08-25 Thread David Herrmann
Hi On Sun, Aug 25, 2013 at 9:57 AM, Pekka Paalanen wrote: > On Fri, 23 Aug 2013 19:54:17 + > "Bryce W. Harrington" wrote: > >> The build directions guide the user to build and install Wayland in a >> user directory without using superuser privs. However, the weston build >> process includes

[PATCH 10/10] logind: implement generic multi-session

2013-08-25 Thread David Herrmann
This enables the multi-session capability for seats that don't have VTs. For legacy seats with VTs, everything stays the same. However, all other seats now also get the multi-session capability. The only feature that was missing was session-switching. As logind can force a session-switch and signa

[PATCH 09/10] logind: extract has_vts() from can_multi_session()

2013-08-25 Thread David Herrmann
We currently use seat_can_multi_session() to test for two things: * whether the seat can handle session-switching * whether the seat has VTs As both are currently logically equivalent, we didn't care. However, we want to allow session-switching on seats without VTs, so split this helper into: *

[PATCH 08/10] logind: fix session_activate(vtnr = 0)

2013-08-25 Thread David Herrmann
VT numbers start with 1. If a session has vtnr == 0, we must not assume it is running on a VT. Note that this could trigger the assert() below as CreateSession() sets vtnr to 0, not <0. --- src/login/logind-session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/log

[PATCH 07/10] logind: fix seat_can_tty() to check for VTs

2013-08-25 Thread David Herrmann
A seat provides text-logins if it has VTs. This is always limited to seat0 so the seat_is_seat0() check is correct. However, if VTs are disabled, no seat provides text-logins so we also need to check for the console-fd. This was previously: return seat_is_vtconsole(); It looked right, but was fu

[PATCH 06/10] logind: rename vtconsole to seat0

2013-08-25 Thread David Herrmann
The seat->vtconsole member always points to the default seat seat0. Even if VTs are disabled, it's used as default seat. Therefore, rename it to seat0 to correctly state what it is. This also changes the seat files in /run from IS_VTCONSOLE to IS_SEAT0. It wasn't used by any code, yet, so this see

[PATCH 05/10] logind: introduce session-devices

2013-08-25 Thread David Herrmann
urn bus_send_error_reply(connection, message, NULL, -ENODEV); + +session_device_complete_pause(sd); + + reply = dbus_message_new_method_return(message); +if (!reply) +goto oom; + } else { const BusB

[PATCH 04/10] logind: make Session.Activate() lazy

2013-08-25 Thread David Herrmann
Currently, Activate() calls chvt(), which does an ioctl(VT_ACTIVATE) and immediately calls seat_set_active(). However, VTs are allowed to prevent being deactivated. Therefore, logind cannot be sure the VT_ACTIVATE call was actually successful. Furthermore, compositors often need to clean up their

[PATCH 03/10] logind: add session controllers

2013-08-25 Thread David Herrmann
A session usually has only a single compositor or other application that controls graphics and input devices on it. To avoid multiple applications from hijacking each other's devices or even using the devices in parallel, we add session controllers. A session controller is an application that mana

[PATCH 02/10] logind: add infrastructure to watch busnames

2013-08-25 Thread David Herrmann
If we want to track bus-names to allow exclusive resource-access, we need a way to get notified when a bus-name is gone. We make logind watch for NameOwnerChanged dbus events and check whether the name is currently watched. If it is, we remove it from the watch-list (notification for other objects

[PATCH 01/10] logind: listen actively for session devices

2013-08-25 Thread David Herrmann
Session compositors need access to fbdev, DRM and evdev devices if they control a session. To make logind pass them to sessions, we need to listen for them actively. However, we avoid creating new seats for non master-of-seat devices. Only once a seat is created, we start remembering all other ses

[PATCH 00/10] Device Management for systemd-logind

2013-08-25 Thread David Herrmann
compositor in a session as normal user. Yay! DropControl(): Drop control again. If the caller is not the current controller, this does nothing. Note that this call is optional. logind watches the bus for disconnect events and invokes this implicitly if a contro

Re: [RFC] weston: Sony clickpad support

2013-08-17 Thread David Herrmann
Hi On Sat, Aug 17, 2013 at 9:49 AM, Peter Hutterer wrote: > On Thu, Aug 15, 2013 at 02:48:48PM -0700, Kristian Høgsberg wrote: >> On Thu, Aug 15, 2013 at 12:10:30PM +0100, Daniel Stone wrote: >> > Hi, >> > >> > On 15 August 2013 11:52, Peter Hutterer wrote: >> > > one of the things that should b

Re: [PATCH v3] Fixes CJK wide character display

2013-08-16 Thread David Herrmann
Hi On Wed, Aug 14, 2013 at 2:30 AM, Kristian Høgsberg wrote: > On Thu, Aug 01, 2013 at 01:49:03PM +0800, Peng Wu wrote: >> By jumping two columns when wide character prints, >> and draw wide cursor under wide character. > > Hi Peng, > > I do want this feature in weston-terminal, but there's still

Re: [PATCH v2 wayland] pkg-config: scanner isn't arch-independent

2013-08-16 Thread David Herrmann
gconfigdir = $(datadir)/pkgconfig > -scannerpkgconfig_DATA = wayland-scanner.pc > +pkgconfig_DATA += wayland-scanner.pc Yepp, we should definitely use pkgconfig_DATA. Reviewed-by: David Herrmann Cheers David > endif > > BUILT_SOURCES =\ &

Re: [RFC] weston: Sony clickpad support

2013-08-13 Thread David Herrmann
Hi On Tue, Aug 13, 2013 at 6:50 AM, Alexander E. Patrakov wrote: > 2013/8/12 David Herrmann : > >> The implementation looks quite nice. I will not comment on the code >> individually, though. I'd really like to see a libtouchpad which >> implements all that logic

Re: [RFC] weston: Sony clickpad support

2013-08-12 Thread David Herrmann
Hi On Mon, Aug 5, 2013 at 12:34 PM, Alexander E. Patrakov wrote: > This patch series adds support to weston for a special type of touchpads > found in some laptops. These touchpads contain one physical button that > covers the whole surface of the touchpad. Unlike the well-known Apple > touchpad,

Re: [RFC] protocol: Extend wayland seat with interfaces for sensor inputs.

2013-08-12 Thread David Herrmann
Hi On Thu, Aug 1, 2013 at 10:39 AM, Stefan Schmidt wrote: > Treating some specific sensors as input devices. In particular > adding support for wl_compass, wl_gyroscope and wl_accelerometer here. > > We have requests to start and stop sensor event receiving as well as > events to receive the diff

Re: [PATCH v2 1/3] Handle CJK wide glyph rendering

2013-07-23 Thread David Herrmann
Hi On Tue, Jul 23, 2013 at 9:49 AM, Peng Wu wrote: > Hi, > > On Tue, 2013-07-23 at 09:22 +0200, David Herrmann wrote: >> Please first address the issues I mentioned in v1. You cannot just >> redraw characters and be fine. That's not how it works. You need to >>

Re: [PATCH v2 1/3] Handle CJK wide glyph rendering

2013-07-23 Thread David Herrmann
Hi On Tue, Jul 23, 2013 at 4:44 AM, Peng Wu wrote: > Yes, I just followed the gnome vte terminal widget code. > I will try to send v3 patch set to remove glib dependencies soon. Please first address the issues I mentioned in v1. You cannot just redraw characters and be fine. That's not how it wo

Re: [PATCH 2/2] Some CJK glyphs are wide, which occupy two columns. If the glyph is wide, then use two columns instead of one.

2013-07-10 Thread David Herrmann
Hi On Thu, Jun 6, 2013 at 9:32 AM, Peng Wu wrote: > --- Please cut the headline and instead provide a proper commit message. > clients/Makefile.am | 2 +- > clients/terminal.c | 18 -- > 2 files changed, 17 insertions(+), 3 deletions(-) > > diff --git a/clients/Makefile.am b/

Re: [PATCH 05/18] fbdev: initialize yoffset of varinfo

2013-06-21 Thread David Herrmann
Hi Marc On Fri, Jun 21, 2013 at 2:17 PM, Marc Chalain wrote: > > > 2013/6/21 David Herrmann >> >> Hi >> >> On Fri, Jun 21, 2013 at 12:05 PM, Marc Chalain >> wrote: >> > >> > >> > 2013/6/21 David Herrmann >> >> &g

Re: [PATCH 05/18] fbdev: initialize yoffset of varinfo

2013-06-21 Thread David Herrmann
Hi On Fri, Jun 21, 2013 at 12:05 PM, Marc Chalain wrote: > > > 2013/6/21 David Herrmann >> >> Hi >> >> On Fri, Jun 21, 2013 at 11:43 AM, Marc Chalain >> wrote: >> > >> > 2013/6/21 David Herrmann >> >> >> >>

Re: [PATCH 05/18] fbdev: initialize yoffset of varinfo

2013-06-21 Thread David Herrmann
Hi On Fri, Jun 21, 2013 at 11:43 AM, Marc Chalain wrote: > > 2013/6/21 David Herrmann >> >> Hi >> >> On Fri, Jun 21, 2013 at 10:49 AM, mchalain [marc.chal...@gmail.com] >> wrote: >> > From: mchalain >> > >> > it initializes varin

Re: [PATCH 1/2] Handle SYN_DROPPED, filter keys with a bitmap

2013-06-21 Thread David Herrmann
Hi On Tue, Jun 4, 2013 at 8:47 PM, Martin Minarik wrote: > Since evdev keys are unreliable, they might randomly get dropped, such > as, on SYN_DROPPED. Even SYN_DROPPED is sometimes not delivered. Ugh, if events are dropped but SYN_DROPPED is missing, it's a kernel bug. Please report it to linux

Re: [PATCH 05/18] fbdev: initialize yoffset of varinfo

2013-06-21 Thread David Herrmann
Hi On Fri, Jun 21, 2013 at 10:49 AM, mchalain [marc.chal...@gmail.com] wrote: > From: mchalain > > it initializes varinfo.yoffset. varinfo.yoffset has to > point on the beginning of the video memory. > The card uses this value to push on the screen a part of > the video memory when this one

Re: [PATCH 1/2] compositor-drm: Cache the DPMS property on drm_output

2013-06-04 Thread David Herrmann
Hi Ander On Tue, Jun 4, 2013 at 3:24 PM, Ander Conselvan de Oliveira wrote: > From: Ander Conselvan de Oliveira > > This avoids one drmModeGetConnector() call every time the DPMS mode is > set. That call can take hundreds of milliseconds due to DDC. > --- > src/compositor-drm.c | 21 +++--

Re: [RFC] libinputmapper: Input device configuration for graphic-servers

2013-05-27 Thread David Herrmann
Hi Peter On Mon, May 27, 2013 at 12:35 PM, Peter Hutterer wrote: > On Fri, May 24, 2013 at 05:07:14PM +0200, David Herrmann wrote: > [...] >> >> This library is intended to solve the classification/detection >> >> problem. While the kernel evdev-interface provides u

Re: [RFC] libinputmapper: Input device configuration for graphic-servers

2013-05-24 Thread David Herrmann
Hi On Thu, May 23, 2013 at 7:32 AM, Peter Hutterer wrote: > On Tue, May 21, 2013 at 04:30:03PM +0200, David Herrmann wrote: >> Hi Peter >> >> On Tue, May 21, 2013 at 6:37 AM, Peter Hutterer >> wrote: >> > On Thu, May 16, 2013 at 03:16:11PM +0200,

Re: [RFC] libinputmapper: Input device configuration for graphic-servers

2013-05-21 Thread David Herrmann
Hi Peter On Tue, May 21, 2013 at 6:37 AM, Peter Hutterer wrote: > On Thu, May 16, 2013 at 03:16:11PM +0200, David Herrmann wrote: >> Hi Peter >> >> On Thu, May 16, 2013 at 7:37 AM, Peter Hutterer >> wrote: >> > On Sun, May 12, 2013 at 04:20:59PM +0200, Da

  1   2   3   >