Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Pekka Paalanen
On Thu, 23 Apr 2015 10:44:50 -0700 Bill Spitzak wrote: > On 04/22/2015 11:38 PM, Pekka Paalanen wrote: > > > Given this and that they must not affect codegen, what are the remaining > > differences between enums and bitfields? Enum can be an int, but a > > bitfield cannot? Is it worth to have th

Re: [PATCH libinput] touchpad: allow BTN_LEFT in clickfinger mode without touches

2015-04-23 Thread Hans de Goede
Hi, On 24-04-15 06:20, Peter Hutterer wrote: On the Logitech T650 it's quite easy to trigger a click without touching the surface. For software buttons we discard those clicks because we can't tell where the finger is to decide on left vs right click. It takes effort to trigger a click with two

[PATCH libinput] touchpad: allow BTN_LEFT in clickfinger mode without touches

2015-04-23 Thread Peter Hutterer
On the Logitech T650 it's quite easy to trigger a click without touching the surface. For software buttons we discard those clicks because we can't tell where the finger is to decide on left vs right click. It takes effort to trigger a click with two fingers without triggering a touch though, so i

Re: [PATCH libinput] Add libinput_device_keyboard_has_key()

2015-04-23 Thread Peter Hutterer
On Thu, Apr 23, 2015 at 05:15:01PM -0500, Derek Foreman wrote: > On 22/04/15 07:05 PM, Peter Hutterer wrote: > > On Wed, Apr 22, 2015 at 08:45:21AM -0500, Derek Foreman wrote: > >> On 21/04/15 11:44 PM, Peter Hutterer wrote: > >>> Similar to libinput_device_pointer_has_button(), this function retur

Re: [PATCH libinput] tests: Add negative test for libinput_device_keyboard_has_key()

2015-04-23 Thread Peter Hutterer
On Thu, Apr 23, 2015 at 05:05:49PM -0500, Derek Foreman wrote: > Ensure we get a -1 return for non-keyboard devices. > > Signed-off-by: Derek Foreman > --- > test/keyboard.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/test/keyboard.c b/test/keyboard.c > index a477c

Re: [PATCH libinput] Add libinput_device_keyboard_has_key()

2015-04-23 Thread Derek Foreman
On 22/04/15 07:05 PM, Peter Hutterer wrote: > On Wed, Apr 22, 2015 at 08:45:21AM -0500, Derek Foreman wrote: >> On 21/04/15 11:44 PM, Peter Hutterer wrote: >>> Similar to libinput_device_pointer_has_button(), this function returns >>> whether >>> a given device has a specific keycode. >>> >>> This

[PATCH libinput] tests: Add negative test for libinput_device_keyboard_has_key()

2015-04-23 Thread Derek Foreman
Ensure we get a -1 return for non-keyboard devices. Signed-off-by: Derek Foreman --- test/keyboard.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/test/keyboard.c b/test/keyboard.c index a477cfb..e098dc0 100644 --- a/test/keyboard.c +++ b/test/keyboard.c @@ -309,6 +309,20

[PATCH weston v4] input: Don't test keyboard/pointer/touch pointers

2015-04-23 Thread Derek Foreman
Keyboards and pointers aren't freed when devices are removed, so we should really be testing keyboard_device_count and pointer_device_count in most cases, not the actual pointers. Otherwise we end up with different behaviour after removing a device than we had before it was inserted. This commit r

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Jeroen Bollen
> (yes the language binding could prevent this, but programmers writing > direct Wayland api are already wading into dangerous waters and can > probably be trusted to do this correctly. So for now I don't think there > is any need for a strict control). I do not quite agree with this. Yes, they sh

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Bill Spitzak
On 04/23/2015 11:28 AM, Jeroen Bollen wrote: > Using enum="interfacename.enumname" would probably work. The > "interfacename." is optional if you are describing a method on the same > interface. Another possibility is to just add interface="interfacename" > to the argument along with enum="

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Bill Spitzak
I think there may be some confusion about how this would be used by a language binding, and why bitmap is necessary, and also why it has to be on the enumeration. Imagine an interface called Widget, and it has two methods set_type(Type) and set_flags(Flags). set_type takes an enumeration call

Re: [PATCH libinput] evdev: add support for LIBINPUT_MODEL_* udev tags

2015-04-23 Thread Benjamin Tissoires
On Thu, Apr 23, 2015 at 6:48 AM, Hans de Goede wrote: > Hi, > > On 23-04-15 04:07, Peter Hutterer wrote: >> >> Some devices need specific configuration or different defaults. >> Push that into udev rules and a hwdb file, that's where detection is the >> easiest. The LIBINPUT_MODEL_ prefix is used

[PATCH libinput v5] evdev: use a different filter for low resolution touchpad on the Lenovo X230

2015-04-23 Thread Benjamin Tissoires
Those touchpads presents an actual lower resolution that what is advertised. We see some jumps from the cursor due to the big steps in X and Y when we are receiving data. For instance, we receive: E: 13.471932 0003 16366# EV_ABS / ABS_X16366 E: 13.471932 0003 0001 9591

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Jeroen Bollen
> Using enum="interfacename.enumname" would probably work. The > "interfacename." is optional if you are describing a method on the same > interface. Another possibility is to just add interface="interfacename" > to the argument along with enum="enumname". The second possibility wouldn't work for

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Bill Spitzak
On 04/22/2015 11:49 PM, Pekka Paalanen wrote: Allowing fully qualified names is another thing. Should we allow it? Is it good practice? Is it useful? How would the fully qualitified names look like? Even if it's not used for codegen, you need it for docgen if you want to be able to reference ot

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Bill Spitzak
On 04/22/2015 11:38 PM, Pekka Paalanen wrote: Given this and that they must not affect codegen, what are the remaining differences between enums and bitfields? Enum can be an int, but a bitfield cannot? Is it worth to have the distinction in the language at all? The distinction is that in a bi

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Jeroen Bollen
Hello, I do think that docenum and enum should be split up. I don't really get the purpose of docenum though. Even if an enum can be extended, that extension would technically be an extension to the protocol, would it not? > Completeness of enums is information that can be encoded in strongly > t

Re: [PATCH libinput v4 0/2] Fix Lenovo X230 series touchpad

2015-04-23 Thread Vasily Khoruzhick
On Thu, Apr 23, 2015 at 1:53 PM, Vasily Khoruzhick wrote: > Hi Benjamin, > > v4 is completely unusable. With slow motion cursor is _too_ slow, with > faster it's too fast. First version was _much_ better. Even more: I'd say non-patched libinput behaves better than v4. Please commit v1 version. R

Re: [PATCH libinput v4 0/2] Fix Lenovo X230 series touchpad

2015-04-23 Thread Vasily Khoruzhick
Hi Benjamin, v4 is completely unusable. With slow motion cursor is _too_ slow, with faster it's too fast. First version was _much_ better. Regards, Vasily On Mon, Apr 20, 2015 at 9:29 PM, Benjamin Tissoires wrote: > Hi, > > This is a new attempt to fix the X230 series. > > This time, I tried to

Re: [PATCH libinput] evdev: add support for LIBINPUT_MODEL_* udev tags

2015-04-23 Thread Hans de Goede
Hi, On 23-04-15 04:07, Peter Hutterer wrote: Some devices need specific configuration or different defaults. Push that into udev rules and a hwdb file, that's where detection is the easiest. The LIBINPUT_MODEL_ prefix is used to determine some type of device model. Note that this property is a p

Re: [PATCH] ivi-shell: support surface screen shot of ivi_layout by using weston_surface_copy_content

2015-04-23 Thread Pekka Paalanen
On Tue, 21 Apr 2015 02:13:15 +0900 Nobuhiko Tanibata wrote: > The reason why the result is not output in the method is that it avoids > to have dependency on CAIRO. If user want to output it to file, user > shall link CAIRO on its controller. > > ivi_layout_surface_get_size is also supported her

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Pekka Paalanen
On Thu, 23 Apr 2015 10:17:12 +0200 Auke Booij wrote: > On 23 April 2015 at 08:38, Pekka Paalanen wrote: > > On Wed, 22 Apr 2015 11:47:51 +0200 > > Auke Booij wrote: > > > >> On 22 April 2015 at 08:34, Pekka Paalanen wrote: > >> > I also think this discussion is going off-topic. You wanted to a

Re: [PATCH wayland] Add "enum" attribute to "arg" elements

2015-04-23 Thread Auke Booij
On 23 April 2015 at 08:38, Pekka Paalanen wrote: > On Wed, 22 Apr 2015 11:47:51 +0200 > Auke Booij wrote: > >> On 22 April 2015 at 08:34, Pekka Paalanen wrote: >> > I also think this discussion is going off-topic. You wanted to add >> > annotations to the XML, so you could find out about enum an