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

2013-10-04 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. --- src/compositor.c | 4 src/compositor.h | 3 +++ src/input.c | 52 +++- 3 f

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

2013-10-04 Thread Bill Spitzak
#include enum Enum {ZERO, A, B, C, D}; Enum operator|(Enum a, Enum b) { return Enum(int(a)|int(b)); } int main() { Enum a(A); Enum b(B); Enum c = a|b; std::cout << a << ',' << b << ',' << c << std::endl; } Wander Lairson Costa wrote: 2013/10/4 Thiago Macieira : On sexta-fei

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

2013-10-04 Thread Wander Lairson Costa
2013/10/4 Thiago Macieira : > On sexta-feira, 4 de outubro de 2013 09:09:32, Wander Lairson Costa wrote: >> The issued raised when I took code from window.c in the weston clients: >> >> mask = xkb_state_serialize_mods(input->xkb.state, >> XKB_STATE_DE

Re: Buffer release events (was: Add support for eglSwapInterval)

2013-10-04 Thread Neil Roberts
Here is a quick summary of the discussion about the release event handling that has partially happened on this list and partially on IRC. Currently the release events are put into a queue so that they are only sent alongside another event sent by the compositor in order to avoid waking up the clie

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

2013-10-04 Thread Thiago Macieira
On sexta-feira, 4 de outubro de 2013 09:09:32, Wander Lairson Costa wrote: > The issued raised when I took code from window.c in the weston clients: > > mask = xkb_state_serialize_mods(input->xkb.state, > XKB_STATE_DEPRESSED | >

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

2013-10-04 Thread Ran Benita
On Fri, Oct 04, 2013 at 03:22:59PM +0200, David Herrmann wrote: > 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 th

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

2013-10-04 Thread Wander Lairson Costa
2013/10/4 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 >>> i

Re: [PATCH v2] Post buffer release events instead of queue when no frame callback

2013-10-04 Thread Neil Roberts
Neil Roberts writes: > I think that would mean you could cause tearing if you are using > eglSwapInterval(0) because you could write into the released buffer > while the GPU is actually still rendering the previous frame using the > buffer in a texture. > > I think this doesn't actually happen at

Re: [PATCH] client: Add a way to get a pointer to the display's default queue

2013-10-04 Thread Tomeu Vizoso
Hi, I have find myself needing this in order to make sure that wl_buffers are destroyed when the wl_surface is, but not before the compositor releases them. So, the client app would be calling wl_surface_destroy, but as the front wl_buffer is still in use by the compositor, the EGL implementation

Re: [PATCH] server: Add API to protect access to an SHM buffer

2013-10-04 Thread Jason Ekstrand
Neil, While I think this patch will work in the single-threaded case, I'm not a big fan of the api for two reasons: 1) without doing thread-local things it is inherently single-threaded. (This is obviously not an issue for Weston, but requiring all shm buffer reads to be on the Wayland fd thread co

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

2013-10-04 Thread Daniel Stone
Hi, On 4 October 2013 14:06, Wander Lairson Costa wrote: > 2013/10/4 Daniel Stone : >> Well sure, but we took the added benefit of type safety (at least with >> C compilers) over the the small potential downside. I was fully aware >> of the technical point there, but don't see it as much of a ri

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: [xkbcommon] Use an integer type for modifiers bit mask.

2013-10-04 Thread Daniel Stone
Hi, On 4 October 2013 13:09, Wander Lairson Costa wrote: > The issued raised when I took code from window.c in the weston clients: > > mask = xkb_state_serialize_mods(input->xkb.state, > XKB_STATE_DEPRESSED | >

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

2013-10-04 Thread Wander Lairson Costa
2013/10/4 Thiago Macieira : > On quinta-feira, 3 de outubro de 2013 23:03:44, Wander Lairson Costa wrote: >> If we combine two enum values, the result is not a valid enum value >> anymore, so it cannot be attributed to an enum variable. >> >> C++ compilers will complain if such an assigment is done

Re: idle tasks starving in toytoolkit

2013-10-04 Thread Tomeu Vizoso
On 27 September 2013 23:34, Daniel Stone wrote: > > Hi, > > On 27 September 2013 05:38, Neil Roberts wrote: > > Pekka Paalanen writes: > >> If not, is there not a possibility to break existing applications by > >> blocking too early? > > > > Yes, you're right, the patch is nonsense because it wo

Re: [RFC DRAFT] graphics tablet protocol extension

2013-10-04 Thread Peter Hutterer
On Thu, Oct 03, 2013 at 03:44:51PM +0200, David Herrmann wrote: [...] > >> > > >> > @@ -1306,6 +1307,19 @@ > >> > > >> > > >> > > >> > + > >> > + > >> > + > >> > +The ID provided will be initialized to the wl_tablet_manager > >> > +interface for thi

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

2013-10-04 Thread Thiago Macieira
On quinta-feira, 3 de outubro de 2013 23:03:44, Wander Lairson Costa wrote: > If we combine two enum values, the result is not a valid enum value > anymore, so it cannot be attributed to an enum variable. > > C++ compilers will complain if such an assigment is done. This is done all the time in C