Re: [PATCH weston] protocol: move sub-surfaces to Wayland

2013-11-15 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 04:12:13PM +0200, ppaala...@gmail.com wrote: > From: Pekka Paalanen > > This reverts commit 2396aec6842c709a714f3825dbad9fd88478f2e6. > > This exact version of the sub-surface protocol has been copied into > Wayland core. Therefore it must be removed from here to avoid bu

[PATCH] client: Introduce functions to allocate and marshal proxies atomically

2013-11-15 Thread Kristian Høgsberg
The server requires clients to only allocate one ID ahead of the previously highest ID in order to keep the ID range tight. Failure to do so will make the server close the client connection. However, the way we allocate new IDs is racy. The generated code looks like: new_proxy = wl_proxy_crea

Re: [PATCH 3/3] shm: Avoid file descriptor leak upon unsuccessful mmap

2013-11-15 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 02:17:56PM +0100, Lubomir Rintel wrote: > It would be possible to make the compositor leak file descriptors by > passing descriptors of open unmmapable files to it, such as /dev/null. > > Signed-off-by: Lubomir Rintel > --- > src/wayland-shm.c | 2 +- > 1 file changed, 1

Re: [PATCH 2/3] shm: Do not attempt mmap if no file descriptor was received

2013-11-15 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 02:17:55PM +0100, Lubomir Rintel wrote: > This is just for the sake of cleanliness and correct error handling. > Without this the mmap would fail emitting an error message about failed > mapping to the client and a close of bogus file descriptor would be > attempted, which

Re: [PATCH 1/3] connection: Only read file descriptor if it was actually received

2013-11-15 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 02:17:54PM +0100, Lubomir Rintel wrote: > Otherwise the tail of fds_in buffer would just shift beyond the beginning. > That confuses the actual request handler and results in a crash further on > due to corrupted tail. > > Signal the lack of file descriptor with -1, so that

Re: [PATCH] Add [core] backend option

2013-11-15 Thread Kristian Høgsberg
On Fri, Nov 15, 2013 at 02:18:15PM +0100, Lubomir Rintel wrote: > This allows specifying a particular backend to load in a manner similar to > modules. > > Signed-off-by: Lubomir Rintel Yes, that's a good addition, committed. Kristian > --- > man/weston.ini.man | 17 + > src/c

Re: [PATCH weston 5/5] shell: override the default pointer grab interface

2013-11-15 Thread Giulio Camuffo
I agree. I wondered indeed if it made more sense to remove the default implementations in input.c and mandate all the shells to have a default grab. I'm not sure how a flag would work given it not only does need to not pick a surface, but also pick another one. A "don't pick and pick its private_co

Re: [PATCH weston 5/5] shell: override the default pointer grab interface

2013-11-15 Thread Kristian Høgsberg
On Thu, Nov 14, 2013 at 11:42:54PM +0100, Giulio Camuffo wrote: > when a fullscreen surface hides the cursor, such as mpv, we must > make sure that the cursor gets hidden also when it is over the > underlying black surface. so check if the surface under the pointer > is a black surface and focus on

Re: [PATCH weston 2/5] zoom: use the new pointer motion signal to move the zoom frame.

2013-11-15 Thread Kristian Høgsberg
On Thu, Nov 14, 2013 at 11:42:51PM +0100, Giulio Camuffo wrote: > --- > src/compositor.h | 3 +++ > src/input.c | 8 > src/shell.c | 3 +-- > src/zoom.c | 27 +++ > 4 files changed, 31 insertions(+), 10 deletions(-) That is nice, I like it a lot

Re: [PATCH] Add documentation for wl_shm_buffer_begin/end_access

2013-11-15 Thread Kristian Høgsberg
On Thu, Nov 14, 2013 at 12:28:51PM +, Neil Roberts wrote: > It's not obvious that these functions are needed so it would be good > to have some documentation for them. > --- > doc/doxygen/Makefile.am | 3 ++- > src/wayland-shm.c | 64 > +

[PATCH weston 2/2] compositor: set weston_surface:resource to NULL when destroyed

2013-11-15 Thread Giulio Camuffo
with the previous patch the resource isn't used inside weston_surface_destroy() anymore (aside sending events unuseful for a closing client), so we can safely reset it. Reviewed-by: Jason Ekstrand --- src/compositor.c | 4 1 file changed, 4 insertions(+) diff --git a/src/compositor.c b/src

[PATCH weston 1/2] input: set the focus to NULL when the focus's resource is destroyed

2013-11-15 Thread Giulio Camuffo
with the surface ref-count feature a surface may live on after its resource was destroyed. so listen for the resource destroy signal and set the focus to NULL. Reviewed-by: Jason Ekstrand --- src/compositor.h | 3 +++ src/input.c | 50 +- 2 f

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Bill Spitzak
One thing everybody seems to be ignoring is that current wl_shell already has a "don't draw CSD" flag. It is the "fullscreen" indicator. As I see it: - Clients must be able to draw CSD. - The compositor can tell the client whether to draw CSD and can change this over time. It can also tell it

Re: [RFC] Common input device library

2013-11-15 Thread Bill Spitzak
Jasper St. Pierre wrote: It's because the keyboard is a surprisingly complicated tool with multiple modes of operating, probably without you ever realizing it, and clients need all of that power: If I'm typing text, the *labels* of the keys matter, and input methods allow us to translate

Re: [PATCH xwayland 2/3] Check for frame being NULL before setting/unsetting flags

2013-11-15 Thread Dima Ryazanov
You're right, your fix does look better! On Fri, Nov 15, 2013 at 5:07 AM, Axel Davy wrote: > I've posted a patch, which prevents wm->focus_window to be a window > without frame. > > This solves the same bug than this patch, but looks better to me. > > > http://lists.freedesktop.org/archives/wa

[PATCH 7/9] exposay: add cancel impl to the kbd grab iface

2013-11-15 Thread Emilio Pozuelo Monfort
Otherwise we'll crash when cancel is called. Signed-off-by: Emilio Pozuelo Monfort --- src/shell.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/shell.c b/src/shell.c index 2ffd37f..accf4de 100644 --- a/src/shell.c +++ b/src/shell.c @@ -5337,9 +5337,19 @@ exposay_modifier(s

[PATCH 5/9] input: Don't send leave events to destroyed views

2013-11-15 Thread Emilio Pozuelo Monfort
If a view which has focus is destroyed, we would send a leave event while changing focus, causing a segfault. Prevent this by listening to the view's destroy signal and removing it from the pointer focus. Signed-off-by: Emilio Pozuelo Monfort --- src/compositor.h | 1 + src/input.c | 25 ++

Re: [RFC] Common input device library

2013-11-15 Thread Artsiom Anikeyenka
Hmm, that's quite interesting, I've never thought of keyboard this way, really. And I think this is because all of that is redundant actually. Client should provide you with the ability to configure which button and for what reason you want to press. For example when you install ubuntu it asks you

[PATCH 9/9] shell: Set output on the focus_surfaces' view

2013-11-15 Thread Emilio Pozuelo Monfort
Otherwise we crash when animating the view. Signed-off-by: Emilio Pozuelo Monfort --- src/shell.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shell.c b/src/shell.c index 08d2627..fd158eb 100644 --- a/src/shell.c +++ b/src/shell.c @@ -615,6 +615,7 @@ create_focus_surface(struct weston

[PATCH 6/9] shell: Implement alt-tab switcher

2013-11-15 Thread Emilio Pozuelo Monfort
Signed-off-by: Emilio Pozuelo Monfort --- src/shell.c | 248 1 file changed, 248 insertions(+) diff --git a/src/shell.c b/src/shell.c index d7e7240..2ffd37f 100644 --- a/src/shell.c +++ b/src/shell.c @@ -,6 +,251 @@ terminate_b

[PATCH 3/9] Add move/scale animation

2013-11-15 Thread Emilio Pozuelo Monfort
From: Daniel Stone Add an animation which moves a surface to a new location, at the same time as also rescaling it to a different size from the origin, rather than the existing scale animation which resizes from the centre. [pochu: rebased, ported to weston_view] --- src/animation.c | 62 +

[PATCH 4/9] Add Exposay

2013-11-15 Thread Emilio Pozuelo Monfort
From: Daniel Stone Exposay provides window overview functions which, when a key which produces the binding modifier is pressed on its own, scales all currently-open windows down to be shown overlaid on the desktop, providing keyboard and mouse navigation to be able to switch window focus. [pochu

[PATCH 8/9] exposay: Activate a surface when hovering it

2013-11-15 Thread Emilio Pozuelo Monfort
This causes the surface to get the keyboard focus, which in turn causes focus-animation to nicely work with exposay, making the not focused surfaces to be dimmed. Signed-off-by: Emilio Pozuelo Monfort --- src/shell.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shell

[PATCH 0/9] exposay & alt-tab

2013-11-15 Thread Emilio Pozuelo Monfort
The following series adds exposay as previously submitted on the list but rebased on master. It also adds an alt-tab switcher which is a nice demonstration of weston_views. In addition there's a bug fix in the input code that is easily triggered by exposay. Daniel Stone (3): Add modifier-only bi

[PATCH 2/9] Add modifier-only binding

2013-11-15 Thread Emilio Pozuelo Monfort
From: Daniel Stone Add the ability to bind to modifiers; the binding is armed when a key which sets the requested modifier is pressed, and triggered if the key is released with no other keys having been pressed in the meantime, as well as mouse buttons or scroll axes. This only works for direct

[PATCH 1/9] animation, shell: add kbd focus change animation

2013-11-15 Thread Emilio Pozuelo Monfort
From: Louis-Francis Ratté-Boulianne When enabled, this will make all but the keyboard-focused window dim. Also the background gets dimmed, if there are any windows open. The panel is not dimmed. When the keyboard focus changes, the change in dimming is animated. The dimming is implemented with

Re: [RFC] Common input device library

2013-11-15 Thread Jasper St. Pierre
It's because the keyboard is a surprisingly complicated tool with multiple modes of operating, probably without you ever realizing it, and clients need all of that power: If I'm typing text, the *labels* of the keys matter, and input methods allow us to translate sequences of key presses and rel

Re: [RFC] Common input device library

2013-11-15 Thread Artsiom Anikeyenka
Thanks! That's strange... I mean... It sounds like there are extra levels of responsibility. What I would expect is one way flow with 1 component processing all the input. 1 person will hardly deal with more then 1 output (though it may use several inputs at a time). That's y the concept of 1 activ

Re: [RFC] Common input device library

2013-11-15 Thread Jasper St. Pierre
If by libxcbcommon you mean libxkbcommon, no. libxkbcommon is about the complex ways of interpreting key events, with client-side key maps, modifiers, accessibility features (latched keys, sticky keys, etc.). It's meant to be used from both the compositor and the client. libinput is about replaci

Re: [RFC] Common input device library

2013-11-15 Thread Artsiom Anikeyenka
Is libinput supposed to be sort of replacement for libxcbcommon? Thanks. On Thu, Nov 14, 2013 at 4:58 PM, Artsiom Anikeyenka wrote: > I like the generalized architecture of any input handling as well. I > didn't look into the code because I will hardly understand it yet. I also > don't understa

Re: [chromium-dev] Re: PSA: Chromium Wayland preview

2013-11-15 Thread Prabhu S
Got the chorme-ozone working for ARM with proprietary GPU drivers. It is neat! WebGL also working very good. I recommend to use gold linker and latest ninja(1.4). I have to make only the following change @@ -117,7 +117,7 @@ bool GLSurfaceEGL::InitializeOneOff() { LOG(ERROR) << "OZONE failed

Re: [PATCH mesa v5 2/2] wayland: Add support for eglSwapInterval

2013-11-15 Thread Axel Davy
I'm not sure waiting 10ms when all the buffers aren't released is the best solution. In fact, I experimented a eglSwapInterval(0) behaviour with a simple patch to enable it: having 4 back buffers and using a roundtrip after commiting (that is: a bit similar to what you do, but without the poll

[PATCH weston] protocol: move sub-surfaces to Wayland

2013-11-15 Thread ppaalanen
From: Pekka Paalanen This reverts commit 2396aec6842c709a714f3825dbad9fd88478f2e6. This exact version of the sub-surface protocol has been copied into Wayland core. Therefore it must be removed from here to avoid build conflicts and useless duplication. No other changes to sub-surface protocol

[PATCH wayland] protocol: add sub-surfaces to the core

2013-11-15 Thread ppaalanen
From: Pekka Paalanen The sub-surface protocol was originally committed into Weston on May 10th, 2013, in commit 2396aec6842c709a714f3825dbad9fd88478f2e6. The design for the protocol had started in the beginning of December 2012. I think it is high time to move this into the core now. This patch

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Armin K.
On 11/15/2013 01:50 PM, Jasper St. Pierre wrote: > Ah, whoops, I read your email wrong. It sounds like you're also in favor > of requiring CSD support from the client. > > That said, I'm curious about cases like Nautilus under SSD. Should we > hide the close button, or do anything like that to mak

[PATCH mesa v5 2/2] wayland: Add support for eglSwapInterval

2013-11-15 Thread Neil Roberts
The Wayland EGL platform now respects the eglSwapInterval value. The value is clamped to either 0 or 1 because it is difficult (and probably not useful) to sync to more than 1 redraw. The main change is that if the swap interval is 0 then Mesa won't install a frame callback so that eglSwapBuffers

[PATCH mesa 1/2] wayland: Block for the frame callback in get_back_bo not dri2_swap_buffers

2013-11-15 Thread Neil Roberts
As per Kristian's suggestion we can avoid the problem of effectively disabling the event queuing mechanism by only doing the sync request when the swap interval is zero. To fix the bug of using three buffers we can just block for the frame callback in get_back_bo instead of swap_buffers. I was orig

Re: Globals deletion

2013-11-15 Thread Pekka Paalanen
On Mon, 21 Oct 2013 11:09:46 +0200 Marek Ch wrote: > Hi, > > I have got one question. In documentation of wl_registry's global_remove > event is: > > "This event notifies the client that the global identified by name is no > longer available. If the client bound to the global using the bind req

Re: Wayland integration tests

2013-11-15 Thread Marek Ch
Hi, Amed assrs a result of previous mailing I've merged wayland-integration-tests into wayland. And, with a tear in my eye, renaead and asswrite xD (actually, I renamed all functions. I removed prefixes). Here's repo with the first version: https://github.com/mchalupa/wayland/tree/wits Regards,

[PATCH] Add [core] backend option

2013-11-15 Thread Lubomir Rintel
This allows specifying a particular backend to load in a manner similar to modules. Signed-off-by: Lubomir Rintel --- man/weston.ini.man | 17 + src/compositor.c | 24 +++- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/man/weston.ini.man b/

[PATCH 3/3] shm: Avoid file descriptor leak upon unsuccessful mmap

2013-11-15 Thread Lubomir Rintel
It would be possible to make the compositor leak file descriptors by passing descriptors of open unmmapable files to it, such as /dev/null. Signed-off-by: Lubomir Rintel --- src/wayland-shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wayland-shm.c b/src/wayland-shm.

[PATCH 1/3] connection: Only read file descriptor if it was actually received

2013-11-15 Thread Lubomir Rintel
Otherwise the tail of fds_in buffer would just shift beyond the beginning. That confuses the actual request handler and results in a crash further on due to corrupted tail. Signal the lack of file descriptor with -1, so that the request handler can determine that no valid file descriptor was recei

[PATCH 2/3] shm: Do not attempt mmap if no file descriptor was received

2013-11-15 Thread Lubomir Rintel
This is just for the sake of cleanliness and correct error handling. Without this the mmap would fail emitting an error message about failed mapping to the client and a close of bogus file descriptor would be attempted, which is harmless since it can not fail. Signed-off-by: Lubomir Rintel ---

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Martin Graesslin
On Friday 15 November 2013 07:50:55 Jasper St. Pierre wrote: > Ah, whoops, I read your email wrong. It sounds like you're also in favor of > requiring CSD support from the client. Yep, I'm fine with ensuring that CSD is the required fallback. As said: I don't want to force anybody to SSD :-) > >

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Jasper St. Pierre
On Fri, Nov 15, 2013 at 8:07 AM, Alex Elsayed wrote: > Jasper St. Pierre wrote: > > > On Fri, Nov 15, 2013 at 6:17 AM, Martin Gräßlin > > wrote: > > > > > > > I think the trap that I personally don't want to run into is the case > > where we have a compositor that doesn't support SSD coupled to

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Alex Elsayed
Jasper St. Pierre wrote: > On Fri, Nov 15, 2013 at 6:17 AM, Martin Gräßlin > wrote: > > > I think the trap that I personally don't want to run into is the case > where we have a compositor that doesn't support SSD coupled to a client > that doesn't support CSD. Nobody can draw the decorations,

Re: [PATCH xwayland 2/3] Check for frame being NULL before setting/unsetting flags

2013-11-15 Thread Axel Davy
I've posted a patch, which prevents wm->focus_window to be a window without frame. This solves the same bug than this patch, but looks better to me. http://lists.freedesktop.org/archives/wayland-devel/2013-November/012008.html Axel Davy Le 15/11/2013 11:25, Axel Davy a écrit : This patch (Ag

[PATCH] XWayland: do not set wm->focus_window to a window with no frame

2013-11-15 Thread Axel Davy
An unmapped window shouldn't be the input focus. This solves some remaining Weston crashes with XWayland, because we assume wm->focus_window has a frame. Signed-off-by: Axel Davy --- src/xwayland/window-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xwayland/window-manager.c

Re: [PATCH weston 3/8] westoy: Use subsurfaces for tooltips instead of transient windows

2013-11-15 Thread Daniel Stone
Hi, On 14 November 2013 20:47, Bill Spitzak wrote: > Jasper St. Pierre wrote: >> Transients, as they existed in wl_shell_surface, have been removed from >> xdg_shell and aren't coming back. There is a new set_transient_for request, >> but it's more to provide something like the ICCCM WM_TRANSIENT

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Jasper St. Pierre
Ah, whoops, I read your email wrong. It sounds like you're also in favor of requiring CSD support from the client. That said, I'm curious about cases like Nautilus under SSD. Should we hide the close button, or do anything like that to make it adapt to an SSD environment? On Fri, Nov 15, 2013 at

Re: Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Jasper St. Pierre
On Fri, Nov 15, 2013 at 6:17 AM, Martin Gräßlin wrote: > Hi all, > > this is a reply to the topic of whether to have information about > decorations > in the xdg_shell at all (see [1]). Sorry that I don't reply to the right > message, had not been subscribed to the list. > > I want to outline why

Thoughts about decoration information in the xdg_shell

2013-11-15 Thread Martin Gräßlin
Hi all, this is a reply to the topic of whether to have information about decorations in the xdg_shell at all (see [1]). Sorry that I don't reply to the right message, had not been subscribed to the list. I want to outline why we in the KDE Plasma team would prefer to have the possibility to t

Re: [PATCH xwayland 2/3] Check for frame being NULL before setting/unsetting flags

2013-11-15 Thread Axel Davy
This patch (Again, I had the same), solves the last bugs for XWayland, but for this one, I'm not sure it is the correct fix. In fact it would mean than focus_window would be an unmapped windows, which looks strange to me. Axel Davy Le 15/11/2013 11:01, Dima Ryazanov a écrit : Fixes a crash in

Re: [PATCH xwayland 3/3] Check if the frame exists before reading its size

2013-11-15 Thread Axel Davy
You were faster than me! I was just about sending this very same patch. The patch is correct as I was explaining in my commit message: "XWayland: Don't access the frame field for unmapped windows. There are situations where weston_wm_window_get_frame_size and weston_wm_window_get_child_

Re: [PATCH xwayland] Set the view to NULL when unmapping an X11 window

2013-11-15 Thread Axel Davy
I've looked deeply in the code to find the remaining xwayland bugs. I'll publish later a fix for these. The remaining bugs are due to accessing to the frame field on unmapped windows. Your patch solves all the issues with the view field. Your patch is tested and Reviewed-by: Axel Davy Axel

[PATCH xwayland 2/3] Check for frame being NULL before setting/unsetting flags

2013-11-15 Thread Dima Ryazanov
Fixes a crash in Firefox when clicking an "install plugin" popup. Signed-off-by: Dima Ryazanov --- src/xwayland/window-manager.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 5ee9480..6d29026 100644 -

[PATCH xwayland 1/3] Set the view to NULL when unmapping an X11 window

2013-11-15 Thread Dima Ryazanov
Fixes a crash caused by accessing a deleted view in weston_wm_window_schedule_repaint. It can be easily reproduced by switching between menus in Firefox. Signed-off-by: Dima Ryazanov --- src/xwayland/window-manager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xwayland/window-man

[PATCH xwayland 3/3] Check if the frame exists before reading its size

2013-11-15 Thread Dima Ryazanov
This fixes crashes caused by popup windows that don't have override_redirect (e.g., menus in VLC and KDE apps), though I don't know if this is correct. Signed-off-by: Dima Ryazanov --- src/xwayland/window-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xwayl

Re: [PATCH xwayland] Set the view to NULL when unmapping an X11 window

2013-11-15 Thread Dima Ryazanov
Oh interesting... I can fix the crash by checking for a NULL pointer, though I don't know if that's the proper fix. Anyways, I'll send out the new patches. On Fri, Nov 15, 2013 at 12:44 AM, Axel Davy wrote: > I have tested your patch, but it doesn't solve all the bugs occuring in > XWayland be

Re: [PATCH xwayland] Set the view to NULL when unmapping an X11 window

2013-11-15 Thread Axel Davy
I have tested your patch, but it doesn't solve all the bugs occuring in XWayland because of views (take vlc, go to the menu, crash). It appears ok to me to set view to NULL at these locations, but there's probably something more to do. Axel Davy On 15/11/2013, Dima Ryazanov wrote : Ping :)

Re: [RFC v2] surface crop & scale protocol extension

2013-11-15 Thread Pekka Paalanen
On Thu, 14 Nov 2013 12:27:22 -0800 Bill Spitzak wrote: > Pekka Paalanen wrote: > > > Yes, you cannot use non-integer surface sizes. You cannot express a > > surface size, that would result in a 1024x1024 area in output pixels, > > because 1024 is not divisible by output_scale=3. > > Thanks. Tha