Migrated randr protocol patch to weston git upstream

2015-04-08 Thread Leslie Zhai
Hi wayland developers, I found that Quanxian Wang had implemented randr protocol in 2014 http://lists.freedesktop.org/archives/wayland-devel/2014-April/014091.html But I could not find randr relative branch in weston official git http://cgit.freedesktop.org/wayland/weston/?h=XXX I will fork

Re: [PATCH weston] xwm: Add and use helper function for looking up windows in the hash table

2015-04-08 Thread Pekka Paalanen
On Wed, 8 Apr 2015 13:35:44 -0500 Derek Foreman wrote: > This lets us verify that all callers are actually testing for a > successful hash lookup at compile time. > > All current users of hash_table_lookup are converted to the new > wm_lookup_window() and the appropriate success check is added.

[PATCH libinput 2/2] touchpad: rename real_touches to num_slots

2015-04-08 Thread Peter Hutterer
Less ambiguous since real_touches can be interpreted to "current number of real touches as opposed to fake touches". Which it isn't, this variable holds the number of slots. Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad-gestures.c | 2 +- src/evdev-mt-touchpad.c | 10 +---

[PATCH libinput 1/2] touchpad: a touch in TOUCH_NONE doesn't need to be ended

2015-04-08 Thread Peter Hutterer
Signed-off-by: Peter Hutterer --- src/evdev-mt-touchpad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 19ec99e..0627056 100644 --- a/src/evdev-mt-touchpad.c +++ b/src/evdev-mt-touchpad.c @@ -547,7 +547,8 @@ tp_unhove

Re: [PATCH libinput v2 4/4] touchpad: Implement pinch gesture support

2015-04-08 Thread Peter Hutterer
On Thu, Mar 26, 2015 at 10:04:40AM +0100, Hans de Goede wrote: > Implement touchpad pinch (and rotate) gesture support. > > Note that two two-finger scrolling tests are slightly tweaked to assure that > there is enough touch movement to allow the scroll-or-pinch detect code to do > its works. > >

Re: [PATCH libinput v3] evdev: Add support for POINTINGSTICK_CONST_ACCEL udev property

2015-04-08 Thread Peter Hutterer
On Wed, Apr 08, 2015 at 12:11:58PM +0200, Hans de Goede wrote: > There is quite a wide spread in the delta events generated by trackpoints, > some generate deltas of 1-2 under normal use, while others generate deltas > from 1-20. > > It is desirable to normalize trackpoint deltas just like we are

[PATCH libinput] touchpad: detect fake finger overflow after BTN_TOOL_QUINTTAB

2015-04-08 Thread Peter Hutterer
Up to QUINTTAP, we count fake fingers through the BTN_TOOL_*TAP kernel defines. Once we exceed QUINTTAP, the nfake_finger count returns to 0 and tp_unhover_touches terminates all touch sequences. The most visible effect of this was stopped in 591a41f but the problem remained. Since we're not using

[PATCH libinput] evdev: reject devices with only one of x/y resolution

2015-04-08 Thread Peter Hutterer
This is a kernel bug, reject such devices outright. This saves us from a bunch of extra double checks to make sure that the resolutions are always set up. Signed-off-by: Peter Hutterer --- src/evdev.c | 32 +- test/device.c | 87 +

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

2015-04-08 Thread Bill Spitzak
On 04/08/2015 02:35 PM, Daniel Stone wrote: The best solution is to use strlcpy. If politics make that impossible, use snprintf(dest, len, "%s", src) which is exactly the same as strlcpy, including the return value! (imagine that...) It's not the politics, it's that silently t

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

2015-04-08 Thread Daniel Stone
On Wednesday, April 8, 2015, Bill Spitzak wrote: > On 04/07/2015 05:03 PM, Bryce Harrington wrote: > >> I'm sure this is not going to ever be a problem since tty filenames and >> paths are on the short side, but since the tty string is an input >> parameter to this routine, it would be better def

Re: [PATCH] protocol: Add DnD actions

2015-04-08 Thread Bill Spitzak
On 04/08/2015 07:46 AM, Carlos Garnacho wrote: I may be missing something. As far as I can tell your proposal is that the source and destination send sets of actions to the compositor, the compositor then intersects the sets, and sends the result of the intersection to the source and destina

[PATCH weston] input: Don't use uninitialized variables in default_grab_pointer_focus()

2015-04-08 Thread Derek Foreman
If we have no pointer focus and weston_compositor_pick_view() returns NULL default_grab_pointer_focus() will test the unset sx, sy output parameters from weston_compositor_pick_view(). Instead, assume that since both pointers are NULL focus hasn't changed and we don't need to update pointer focus.

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

2015-04-08 Thread Bill Spitzak
On 04/07/2015 05:03 PM, Bryce Harrington wrote: I'm sure this is not going to ever be a problem since tty filenames and paths are on the short side, but since the tty string is an input parameter to this routine, it would be better defensive programming to use strncpy. strncpy is not a fix and

Re: [PATCH] config: use simpler regexp syntax to get dot version

2015-04-08 Thread Bill Spitzak
On 04/08/2015 12:15 AM, Pekka Paalanen wrote: + dot_version=`$DOT -V 2>&1|$GREP -o ['[0-9]*\.[0-9]*\.[0-9]*']` AS_VERSION_COMPARE([$dot_version], [2.26.0], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Graphviz dot $dot_version too old.

Re: [PATCH weston 16/17] xdg-shell: Specify fullscreen size-mismatch handling

2015-04-08 Thread Bill Spitzak
I think the compositor is allowed to choose a color other than black, right? On 04/07/2015 07:52 PM, Bryce Harrington wrote: +If the surface doesn't cover the whole output, the compositor will +position the surface in the center of the output and compensate with +black b

Re: [PATCH weston 02/17] xdg-shell: Require proper object tree destruction

2015-04-08 Thread Bill Spitzak
Will these windows then unmap atomically? I actually expected the opposite to be allowed and encouraged, as destroying a parent surface could then guarantee the children disappear atomically. On 04/07/2015 05:25 PM, Bryce Harrington wrote: On Tue, Apr 07, 2015 at 05:01:17PM +0800, Jonas Ådah

[PATCH weston 2/2] desktop-shell: Remove the panel popup

2015-04-08 Thread Dima Ryazanov
It doesn't work anymore, and it never did anything useful. Signed-off-by: Dima Ryazanov --- clients/desktop-shell.c | 33 - 1 file changed, 33 deletions(-) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index ac2928f..e2f9f80 100644 --- a/clients/

[PATCH weston 1/2] desktop-shell: Require a popup parent to be a shell surface

2015-04-08 Thread Dima Ryazanov
Currently, the shell crashes if the parent is not a shell surface. Instead, send an error to the client. Signed-off-by: Dima Ryazanov --- desktop-shell/shell.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index f7c

[PATCH weston] xwm: Add and use helper function for looking up windows in the hash table

2015-04-08 Thread Derek Foreman
This lets us verify that all callers are actually testing for a successful hash lookup at compile time. All current users of hash_table_lookup are converted to the new wm_lookup_window() and the appropriate success check is added. This fixes any call sites that used to assume a successful return a

Re: [PATCH weston] desktop-shell: Fix a crash when right-clicking the panel

2015-04-08 Thread Dima Ryazanov
Sure, I'll remove it then. (I was going to remove it originally - but figured, it was useful for testing since it exposed this bug.) On Wed, Apr 8, 2015 at 7:00 AM, Pekka Paalanen wrote: > On Mon, 6 Apr 2015 13:27:23 -0700 > Dima Ryazanov wrote: > > > Yeah, the logic is pretty sketchy now - "if

Re: [PATCH libinput] touchpad: count the tapping fingers separately from the main touchpad code

2015-04-08 Thread Jason Gerecke
On 4/7/2015 8:54 PM, Peter Hutterer wrote: tp->nfingers_down gives us the current state of the touchpad but in the case of the tapping state we need the touchpoints separately. If all touchpoints end in the same SYN_REPORT frame, tp->nfingers_down is 0 when we handle the touch releases. This chan

Re: [PATCH weston 1/3] gl-renderer: fix EGL initialization steps

2015-04-08 Thread Daniel Stone
On 8 April 2015 at 17:17, Manuel Bachmann wrote: > Looks good to me ! All three R-b and pushed; thanks. b4deec6..8b69d03 master -> master Cheers, Daniel > 2015-04-08 16:02 GMT+02:00 Pekka Paalanen : >> >> From: Manuel Bachmann >> >> Some DRI drivers, including VMware vmwgfx, do not support

Re: [PATCH weston 2/3] gl-renderer: check EGL_EXT_platform_base in supports()

2015-04-08 Thread Manuel Bachmann
Looks good to me ! 2015-04-08 16:02 GMT+02:00 Pekka Paalanen : > From: Pekka Paalanen > > An EGL implementation may support client extensions without supporting > EGL_EXT_platform_base. In such a case, we should return 0 to fall back > to the old eglGetDisplay() way. > > Cc: Manuel Bachmann > S

Re: [PATCH weston 1/3] gl-renderer: fix EGL initialization steps

2015-04-08 Thread Manuel Bachmann
Looks good to me ! 2015-04-08 16:02 GMT+02:00 Pekka Paalanen : > From: Manuel Bachmann > > Some DRI drivers, including VMware vmwgfx, do not support > calling eglQueryString() with a EGL_NO_DISPLAY parameter. > Just as we do in gl_renderer_supports(), which returns 0 > but does not fail in this

Re: [PATCH] protocol: Add DnD actions

2015-04-08 Thread Carlos Garnacho
Hey Bill, On mié, 2015-03-18 at 19:40 -0700, Bill Spitzak wrote: > This is still bothering me as being much too complicated. The bad news is, DnD is complex, there's plenty of prior usecases here that won't be fair/possible to have "simplified". > > I think a list of actions can be sent from t

[PATCH v2] data-device: Implement DnD actions

2015-04-08 Thread Carlos Garnacho
The policy in weston in order to determine the chosen DnD action is deliberately simple, and is probably the minimals that any compositor should be doing here. Besides honoring the notify_actions requests on both wl_data_source and wl_data_offer, weston now emits the newly added events notifying b

[PATCH v2] protocol: Add DnD actions

2015-04-08 Thread Carlos Garnacho
These 2 requests have been added: - wl_data_source.notify_actions request: Notifies the compositor of the available actions on the data source. - wl_data_offer.notify_actions request: Notifies the compositor of the available actions on the destination side, plus the preferred action. Out of t

Re: [PATCH weston] desktop-shell: Fix a crash when right-clicking the panel

2015-04-08 Thread Pekka Paalanen
On Mon, 6 Apr 2015 13:27:23 -0700 Dima Ryazanov wrote: > Yeah, the logic is pretty sketchy now - "if it's a shell surface, do the > error checking; otherwise, do nothing" - but I don't understand the code > well enough to know if this is the expected behavior. > > Should the panel just be a shel

[PATCH weston 1/3] gl-renderer: fix EGL initialization steps

2015-04-08 Thread Pekka Paalanen
From: Manuel Bachmann Some DRI drivers, including VMware vmwgfx, do not support calling eglQueryString() with a EGL_NO_DISPLAY parameter. Just as we do in gl_renderer_supports(), which returns 0 but does not fail in this case, do not fail in gl_renderer_setup_egl_extensions(). Signed-off-by: Man

Re: [PATCH] protocol: Add DnD actions

2015-04-08 Thread Carlos Garnacho
Hey Bryce, Thanks for the review! I'm attaching new patches fixing the issues you/Marek have seen, the doc blurbs have been reworded in a few places. This v2 also adds a wl_data_offer.source_actions event. This allows drag destinations to adapt their action mask accordingly, instead just being

[PATCH weston 2/3] gl-renderer: check EGL_EXT_platform_base in supports()

2015-04-08 Thread Pekka Paalanen
From: Pekka Paalanen An EGL implementation may support client extensions without supporting EGL_EXT_platform_base. In such a case, we should return 0 to fall back to the old eglGetDisplay() way. Cc: Manuel Bachmann Signed-off-by: Pekka Paalanen --- src/gl-renderer.c | 7 +-- 1 file change

[PATCH weston 3/3] gl-renderer: fix configless_context check

2015-04-08 Thread Pekka Paalanen
From: Pekka Paalanen EGL_MESA_configless_context is a display extension. The query for client extensions was overwriting the pointer, so it was being searched from the client extensions instead. Fix any confusion here by moving all client extension checks into another function. Drop a useless ca

Re: modules=xwayland.so ignored (Was: Xfig menus don't appear - bug?)

2015-04-08 Thread Pekka Paalanen
On Wed, 8 Apr 2015 14:41:10 +0100 "Felix E. Klee" wrote: > On Wed, Apr 8, 2015 at 11:16 AM, Pekka Paalanen > wrote: > > try removing that tab from your .ini. > > I tried with spaces, with tab, and without; But probably when I first > tried without indentation, I didn’t save, because: After remo

Re: modules=xwayland.so ignored (Was: Xfig menus don't appear - bug?)

2015-04-08 Thread Felix E. Klee
On Wed, Apr 8, 2015 at 11:16 AM, Pekka Paalanen wrote: > try removing that tab from your .ini. I tried with spaces, with tab, and without; But probably when I first tried without indentation, I didn’t save, because: After removing the tab, now it works! > Should probably fix that one day... Don

Re: [PATCH weston] gl-renderer: fix EGL initialization steps

2015-04-08 Thread Pekka Paalanen
On Fri, 3 Apr 2015 07:05:23 +0200 Manuel Bachmann wrote: > From: Manuel Bachmann > > Some DRI drivers, including VMware vmwgfx, do not support > calling eglQueryString() with a EGL_NO_DISPLAY parameter. > Just as we do in gl_renderer_supports(), which returns 0 > but does not fail in this case

Re: [PATCH weston 3/3] xwm: Test hash_table_lookup() returns

2015-04-08 Thread Derek Foreman
On 08/04/15 07:41 AM, Pekka Paalanen wrote: > On Tue, 7 Apr 2015 12:12:15 -0500 > Derek Foreman wrote: > >> Make sure we always test hash_table_lookup()s return to prevent trying to >> dereference a NULL window. >> >> Signed-off-by: Derek Foreman >> --- >> xwayland/window-manager.c | 103 >> +

Re: [PATCH weston 3/3] xwm: Test hash_table_lookup() returns

2015-04-08 Thread Pekka Paalanen
On Tue, 7 Apr 2015 12:12:15 -0500 Derek Foreman wrote: > Make sure we always test hash_table_lookup()s return to prevent trying to > dereference a NULL window. > > Signed-off-by: Derek Foreman > --- > xwayland/window-manager.c | 103 > +- > 1 file

Re: [PATCH weston 2/3] xwm: Make hash_table_lookup use an output parameter

2015-04-08 Thread Pekka Paalanen
On Tue, 7 Apr 2015 12:12:14 -0500 Derek Foreman wrote: > Previously hash_table_lookup returned a pointer which must always be tested > for NULL - but rarely was. > > Now hash_table_lookup returns the found data as an out parameter and returns > an integer indicating whether the lookup succeeded

Re: [PATCH weston 1/3] xwm: fix extra break

2015-04-08 Thread Pekka Paalanen
On Tue, 7 Apr 2015 12:12:13 -0500 Derek Foreman wrote: > The first break in TYPE_WM_PROTOCOLS was almost certainly intended to be > nested within the if statement. > > Even if it wasn't, it makes sense there. > > Signed-off-by: Derek Foreman > --- > xwayland/window-manager.c | 6 +++--- > 1

Re: [PATCH weston 3/3] xwm: Test hash_table_lookup() returns

2015-04-08 Thread Pekka Paalanen
On Tue, 07 Apr 2015 13:48:59 -0500 Derek Foreman wrote: > > I don't like the temporary variable, it seems like you can just put the > > call to hash_table_lookup in the if statement and it will be clearer. > > I dunno, the if statement pretty much always exceeds 80 cols and I have > to break it

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

2015-04-08 Thread Potrola, MateuszX
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 ha

Re: modules=xwayland.so ignored (Was: Xfig menus don't appear - bug?)

2015-04-08 Thread Pekka Paalanen
On Wed, 8 Apr 2015 08:47:41 +0100 "Felix E. Klee" wrote: > On Wed, Apr 8, 2015 at 8:20 AM, Pekka Paalanen > wrote: > > if you check Weston's output, it says which config file it is reading. > > Is it reading the one you are editing? > > To create the attached log file I ran: > > $ weston-l

[PATCH libinput v3] evdev: Add support for POINTINGSTICK_CONST_ACCEL udev property

2015-04-08 Thread Hans de Goede
There is quite a wide spread in the delta events generated by trackpoints, some generate deltas of 1-2 under normal use, while others generate deltas from 1-20. It is desirable to normalize trackpoint deltas just like we are normalizing mouse deltas to 1000 dpi, so as to give different model lapto

Re: [PATCH weston v2 0/9] Enable test configuration

2015-04-08 Thread Pekka Paalanen
On Tue, 7 Apr 2015 15:32:51 -0700 Bryce Harrington wrote: > On Tue, Apr 07, 2015 at 02:44:59PM +0300, Pekka Paalanen wrote: > > On Thu, 2 Apr 2015 19:16:49 -0700 > > Bryce Harrington wrote: > > > > > This enables tests to provide their own .ini files for configuring > > > weston, via the recen

Re: [PATCH libinput] evdev: fix inverted mouse normalization

2015-04-08 Thread Hans de Goede
p.s. I've not pushed the patch attached to: https://bugs.freedesktop.org/show_bug.cgi?id=89949 As I assume you want to wait for feedback from the bug reporter, but it looks good to me, so feel free to push it. On 08-04-15 08:05, Peter Hutterer wrote: Regression introduced in 9f8edc5fd880e0

Re: [PATCH libinput] touchpad: count the tapping fingers separately from the main touchpad code

2015-04-08 Thread Hans de Goede
Hi, On 08-04-15 05:54, Peter Hutterer wrote: tp->nfingers_down gives us the current state of the touchpad but in the case of the tapping state we need the touchpoints separately. If all touchpoints end in the same SYN_REPORT frame, tp->nfingers_down is 0 when we handle the touch releases. This c

Re: [PATCH libinput] evdev: fix inverted mouse normalization

2015-04-08 Thread Hans de Goede
Hi, On 08-04-15 08:05, Peter Hutterer wrote: Regression introduced in 9f8edc5fd880e0a9c482b36e6b4120ccc056ee0b where it changed from delta / (dpi/default) to delta * dpi/default, causing the inverse effect of what the dpi setting is supposed to achieve. Signed-off-by: Peter Hutterer Looks go

Re: [PATCH libinput 1/5] evdev: fix crash for missing ABS_X/Y

2015-04-08 Thread Hans de Goede
Hi, On 08-04-15 01:54, Peter Hutterer wrote: libevdev_set_abs_info() is a noop if the event code isn't enabled on the device. This leaves ABS_X/Y on NULL, causing a crash later when dereferencing the absinfo. https://bugs.freedesktop.org/show_bug.cgi?id=89783 Signed-off-by: Peter Hutterer E

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: [PATCH] weston-launch: Fixed TTY switching

2015-04-08 Thread Pekka Paalanen
David, would you happen to have a moment to look at this, please? Thanks, pq On Wed, 1 Apr 2015 08:10:44 +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 SI

Re: [PATCH 2/6] compositor-drm: Allow instant start of repaint loop.

2015-04-08 Thread Pekka Paalanen
On Wed, 08 Apr 2015 03:12:25 +0200 Mario Kleiner wrote: > On 04/07/2015 09:34 AM, Pekka Paalanen wrote: > > On Sat, 04 Apr 2015 19:45:10 +0200 > > Mario Kleiner wrote: > > > >> On 04/02/2015 01:37 PM, Pekka Paalanen wrote: > >>> On Thu, 2 Apr 2015 07:10:50 +0200 > >>> Mario Kleiner wrote: > >>

modules=xwayland.so ignored (Was: Xfig menus don't appear - bug?)

2015-04-08 Thread Felix E. Klee
On Wed, Apr 8, 2015 at 8:20 AM, Pekka Paalanen wrote: > if you check Weston's output, it says which config file it is reading. > Is it reading the one you are editing? To create the attached log file I ran: $ weston-launch –-verbose >/tmp/weston.log 2>&1 Starting `xterm` from within the Wes

Re: Xfig menus don't appear - bug?

2015-04-08 Thread Pekka Paalanen
On Tue, 7 Apr 2015 23:54:17 +0100 "Felix E. Klee" wrote: > By the way, what also doesn’t work is loading XWayland based on > configuration settings in my `~/.config/weston.ini`: > > [core] > modules=xwayland.so > > What works is specifying XWayland on the command line: > > $ we

Re: [PATCH] config: use simpler regexp syntax to get dot version

2015-04-08 Thread Pekka Paalanen
On Thu, 2 Apr 2015 19:20:00 -0700 Bill Spitzak wrote: > I wasted a lot of time before I figured out that I needed to add those > square brackets to get this to work. Sigh... > > --- > configure.ac |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/configure.ac b/confi