Re: [PATCH 0/15] Modifier fixups (especially for nested)

2012-06-22 Thread Daniel Stone
Hi, On 22 June 2012 21:13, Kristian Høgsberg wrote: > On Fri, Jun 22, 2012 at 03:47:55PM -0400, Kristian Høgsberg wrote: >> > Under X the stuck modifer problem is gone (yay!), but without XKB >> > support, my Alt now doesn't work.  Ctrl, Shift, Super etc does, which >> > is a little odd... this f

Re: OpenGL in USB Display Devices under wayland

2012-06-22 Thread Casey Dahlin
On Fri, Jun 22, 2012 at 10:29:04PM +0300, Pekka Paalanen wrote: > The trick is in the kernel DRM, which has to be able to deal with the > buffer and actually push it to the USB device. This may require special > allocation flags or somehow using the dmabuf infrastructure to allocate > the buffer, w

Re: [PATCH 0/15] Modifier fixups (especially for nested)

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 03:47:55PM -0400, Kristian Høgsberg wrote: > On Fri, Jun 22, 2012 at 03:02:03PM -0400, Kristian Høgsberg wrote: > > On Fri, Jun 22, 2012 at 01:21:25PM +0100, Daniel Stone wrote: > > > Hi, > > > The following series makes nested compositors in particular track their > > > par

Re: [PATCH 0/15] Modifier fixups (especially for nested)

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 03:02:03PM -0400, Kristian Høgsberg wrote: > On Fri, Jun 22, 2012 at 01:21:25PM +0100, Daniel Stone wrote: > > Hi, > > The following series makes nested compositors in particular track their > > parent server's state more aggressively. The main highlight is probably > > tha

Re: OpenGL in USB Display Devices under wayland

2012-06-22 Thread Pekka Paalanen
On Fri, 22 Jun 2012 14:08:16 -0400 rektide wrote: > On Fri, Jun 22, 2012 at 01:14:00PM -0400, Casey Dahlin wrote: > > On Fri, Jun 22, 2012 at 09:40:43PM +0530, Sannu K wrote: > > > After seeing the changes made in X server for offloading hardware > > > acceleration for USB display devices (displa

Re: [PATCH weston 2/2] compositor-drm: Add proper error handling to init

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 02:04:37PM +0100, Daniel Stone wrote: > This way, if initialisation fails (say, udev or Mesa are broken, or we > couldn't find any devices), we'll at least take you back to where you > were, rather than leave you at a totally broken VT you can't escape > from. Thanks for cl

Re: [PATCH weston 1/2] Split weston_compositor_init into base and _gl

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 02:04:36PM +0100, Daniel Stone wrote: > weston_compositor_init is always called late because most > implementations can't initialise GL until fairly late in the game. > Split it into a base version with the same name, followed by > weston_compositor_init_gl which can be call

Re: [PATCH 0/15] Modifier fixups (especially for nested)

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 01:21:25PM +0100, Daniel Stone wrote: > Hi, > The following series makes nested compositors in particular track their > parent server's state more aggressively. The main highlight is probably > that the stuck modifiers bug under X11 should be completely gone, as > well as e

Re: OpenGL in USB Display Devices under wayland

2012-06-22 Thread Casey Dahlin
On Fri, Jun 22, 2012 at 02:08:16PM -0400, rektide wrote: > How about this question: might Weston be adaptable to serve this use case? > What would be the > major changes to Weston to do this? What other subsystems would have to > change? > Right now wayland doesn't have a protocol to export muc

Re: OpenGL in USB Display Devices under wayland

2012-06-22 Thread rektide
On Fri, Jun 22, 2012 at 01:14:00PM -0400, Casey Dahlin wrote: > On Fri, Jun 22, 2012 at 09:40:43PM +0530, Sannu K wrote: > > After seeing the changes made in X server for offloading hardware > > acceleration for USB display devices (displaylink and others), I am curious > > to know about how Waylan

Re: OpenGL in USB Display Devices under wayland

2012-06-22 Thread Casey Dahlin
On Fri, Jun 22, 2012 at 09:40:43PM +0530, Sannu K wrote: > After seeing the changes made in X server for offloading hardware > acceleration for USB display devices (displaylink and others), I am curious > to know about how Wayland takes care (if at all it does) of offloading > hardware acceleration

OpenGL in USB Display Devices under wayland

2012-06-22 Thread Sannu K
Hi, Intro: USB display devices are dumb framebuffer devices that can drive a CRTC which is connected to the system through USB. These devices can be treated as just USB to VGA (DVI or HDMI) converters. They have some sort of compression (Devices from displaylink is one of them which uses RLE compr

Re: [PATCH] editor: Malloc check, flush stuck keyboard

2012-06-22 Thread Kristian Høgsberg
On Fri, Jun 22, 2012 at 04:59:00AM +0200, Martin Minarik wrote: > The on screen keyboard stays displayed when the editor is closed. > > We need to flush the display once more. > > This patch adds the display_flush() method to window.c, to execute > wl_display_flush() once, not in a loop like in d

[PATCH weston 2/2] compositor-drm: Add proper error handling to init

2012-06-22 Thread Daniel Stone
This way, if initialisation fails (say, udev or Mesa are broken, or we couldn't find any devices), we'll at least take you back to where you were, rather than leave you at a totally broken VT you can't escape from. Signed-off-by: Daniel Stone --- src/compositor-drm.c | 57 +

[PATCH weston 1/2] Split weston_compositor_init into base and _gl

2012-06-22 Thread Daniel Stone
weston_compositor_init is always called late because most implementations can't initialise GL until fairly late in the game. Split it into a base version with the same name, followed by weston_compositor_init_gl which can be called later on. This simplifies compositor-wayland, which no longer need

[PATCH weston 14/14] compositor-wayland: Synchronise keyboard state with parent

2012-06-22 Thread Daniel Stone
Use the wl_keyboard::modifiers events our parent helpfully sends us to make sure our views of the keyboard state are always identical, rather than relying on key press events to do the right thing. Signed-off-by: Daniel Stone --- src/compositor-wayland.c | 28 1 fi

[PATCH weston 11/14] Rename modifier_state_changed to notify_modifiers

2012-06-22 Thread Daniel Stone
notify_modifiers will now synchronise Weston's internal state with the XKB state, and send a modifier event if necessary. This eliminates the need for update_modifier_state to have a return value at all. Signed-off-by: Daniel Stone --- src/compositor.c | 47 ---

[PATCH weston 13/14] compositor-x11: Attempt to track state without XKB

2012-06-22 Thread Daniel Stone
This isn't very pleasant, but it's pretty much the best we can do in the absence of either XCB XKB support, or XCB XI2 bindings (argh!). We get a state mask with most significant X11 events (which inexplicably includes EnterNotify but not FocusIn), but unfortunately it's only a single flat set of

[PATCH weston 12/14] compositor-x11: Use XKB StateNotify to synchronise state

2012-06-22 Thread Daniel Stone
Make sure that we always have the exact same view of the keyboard state as the host server by using XKB StateNotify events to update our state exactly rather than relying on key events. In particular, this fixes key state during grabs, where we either miss modifiers completely or get them stuck pe

[PATCH weston 10/14] notify_key: Add update_state argument

2012-06-22 Thread Daniel Stone
If update_state is true, then notify_key will continue to call xkb_key_update_state to update the local state mask, as before this commit. Otherwise, it will rely on the compositor to manually update the state itself, for nested compositors. Signed-off-by: Daniel Stone --- src/compositor-waylan

[PATCH weston 08/14] compositor-x11: Add base XCB/XKB support

2012-06-22 Thread Daniel Stone
Try to find the XKB extension, to be used in later commits. Signed-off-by: Daniel Stone --- configure.ac | 20 +++- src/compositor-x11.c | 33 + 2 files changed, 52 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac

[PATCH weston 09/14] compositor-x11: Use XKB detectable autorepeat if possible

2012-06-22 Thread Daniel Stone
If we have XCB XKB support, use XKB's detectable autorepeat, which generates repeat sequences as a series of press-press-press-[...]-release events, rather than press-release-press-release-[...]. Signed-off-by: Daniel Stone --- src/compositor-x11.c | 33 +++-- 1 fil

[PATCH weston 06/14] weston_xkb_info: Cache all modifier indices for X11

2012-06-22 Thread Daniel Stone
X11 has a set of eight modifiers which we want to represent. Cache their indices when we create a weston_xkb_info, so we can use this from compositor-x11 to keep the state synchronised exactly between the host X server and a nested Weston instance. Signed-off-by: Daniel Stone --- src/compositor

[PATCH weston 07/14] compositor-x11: Move input creation before output

2012-06-22 Thread Daniel Stone
So we can set up XKB masks and be sure to get the right events before we set up our window. Signed-off-by: Daniel Stone --- src/compositor-x11.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compositor-x11.c b/src/compositor-x11.c index d50261d..d8dbacb 100644

[PATCH weston 05/14] Run key bindings on keyboard focus in

2012-06-22 Thread Daniel Stone
This is mainly for X11's benefit; the common case is using Logo+S to take a screenshot, where GNOME Shell has grabbed Logo, and replays the event down to the nested compositor after S is pressed. This means we get an enter event with both Logo and S down, and even if Shell delivers the key press e

[PATCH weston 02/14] Split notify_keyboard_focus into in/out variants

2012-06-22 Thread Daniel Stone
Since the two functions had nothing in common but the local variables. Signed-off-by: Daniel Stone --- src/compositor-wayland.c |6 ++- src/compositor-x11.c |9 +++- src/compositor.c | 111 -- src/compositor.h | 10 -

[PATCH weston 04/14] Ignore repeat keys in notify_key

2012-06-22 Thread Daniel Stone
Let compositors just blithely post through every event they get, including repeating keys. Signed-off-by: Daniel Stone --- src/compositor.c |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/compositor.c b/src/compositor.c index d914b67..52ef89e 100644 --- a/src/comp

[PATCH weston 03/14] Let wayland-server send modifier events for focus

2012-06-22 Thread Daniel Stone
When the focus changes, wl_keyboard_set_focus (and, as an added bonus, wl_pointer_set_focus) will now send wl_keyboard::modifier events for us if we store the modifier state in the right place, so we don't have to worry about that anymore. Signed-off-by: Daniel Stone --- src/compositor.c | 48

[PATCH weston 01/14] .gitignore: Ignore ctags and cscope output

2012-06-22 Thread Daniel Stone
Signed-off-by: Daniel Stone --- .gitignore |2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 7c5bfe5..5b48ea1 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,8 @@ *.so *.swp *~ +ctags +cscope.out .libs /aclocal.m4 /autom4te.cache -- 1.7.10

[PATCH wayland] Maintain keyboard modifier state in wayland-server

2012-06-22 Thread Daniel Stone
Provide a slot for keyboard modifier state inside wl_keyboard for implementations to update, and use this to send wl_keyboard:;modifier events whenever the keyboard or pointer focus changes. Signed-off-by: Daniel Stone --- src/wayland-server.c | 20 +++- src/wayland-server.h |

[PATCH 0/15] Modifier fixups (especially for nested)

2012-06-22 Thread Daniel Stone
Hi, The following series makes nested compositors in particular track their parent server's state more aggressively. The main highlight is probably that the stuck modifiers bug under X11 should be completely gone, as well as enabling key bindings under GNOME Shell and other compositors that grab m