[PATCH v2 6/6] shell: restore app when workspace_num > 1 on unplugged output

2013-10-22 Thread Xiong Zhang
when workspace_num > 1, the surface on hiden workspace is moved beyond any output through animation, but surface->output point to the last output of weston_compositor->output_list in weston_surface_assign_output(). So surface->output may point to a wrong output which isn't the output the surface be

[PATCH v2 5/6] window, desktop-shell: deal with output unplug on client side

2013-10-22 Thread Xiong Zhang
when output is removed, weston-desktop-shell should destroy panel and background surface on destroyed output. Signed-off-by: Xiong Zhang --- clients/desktop-shell.c | 20 clients/window.c| 32 clients/window.h| 3 +++ 3 files

[PATCH v2 3/6] shell: restroe app run on non default and unplugged output

2013-10-22 Thread Xiong Zhang
if the unplugged output isn't the default output, move cursor surface and APP widow to default output V2: the surface->geometry of child window is a relative coordinate to parent surface, no need to move child surface. Moving parent surface will mark child surface dirty, so the child surfa

[PATCH v2 4/6] shell: restroe app run on default and unplugged output

2013-10-22 Thread Xiong Zhang
if the unplugged output is the first default output, the second output will move to the first working as default output. Mark the surface on unplaugged output as dirty, so on the next output repaint, these surface will reassign output and get the right output. At the same time when moving output, t

[PATCH v2 2/6] shell: register output->destroy_signal handler

2013-10-22 Thread Xiong Zhang
setup_output_destroy_handler() deal with output created at drm backend initialize time. handle_output_create() deal with output created by hot plug handler output_destroy_handler is removed when output was unplugged or shell is destroyed. Signed-off-by: Xiong Zhang --- src/shell.c | 75 +

[PATCH v2 1/6] compositor: set surface->plane from destroyed plane to NULL

2013-10-22 Thread Xiong Zhang
In drm backend, the cursor_surface->plane point to drm_output->cursor_plane.when this output is removed, drm_output->cursor_plane is destroyed, butcursor_surface->plane still point to destroyed plane. So once mouse move to this cursor_surface and system will repaint this cursor_surface, segment fau

[PATCH v2 0/6] restore APP run on unplugged output

2013-10-22 Thread Xiong Zhang
if the unplugged output is the first output in output list, the surface on unplugged output is marked dirty, and the surface on following output is moved ahead orderly. if the unplugged output is the last output in output list, the surface on unplugged output is moved to the first output if the

[PATCH weston] protocol: hook up xmllint to check validity

2013-10-22 Thread Peter Hutterer
--- configure.ac | 11 +++ protocol/Makefile.am | 17 - 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index cfd4540..2d56444 100644 --- a/configure.ac +++ b/configure.ac @@ -474,6 +474,17 @@ if test x$wayland_scanner = x;

[PATCH v2 wayland] protocol: validate the protocol against a dtd

2013-10-22 Thread Peter Hutterer
The scanner is not very forgiving if the protocol doesn't match it's expectations and crashes without much of a notice. Thus, validate the protocol against a DTD. Move the protocol subdir forward so we validate first before trying anything else, and install the DTD so we can validate weston's prot

Re: [PATCH weston 00/13] Split the geometry information from

2013-10-22 Thread Kristian Høgsberg
On Sat, Oct 12, 2013 at 10:38:10PM -0500, Jason Ekstrand wrote: > This patch series is a rebased version of the one I sent earlier to support > the idea of "views". For a more detailed description of "views" see the > first patch in the series. > > There is one small question I have remaining (th

Re: [PATCH 2/2] protocol: add state set functions for maximized and fullscreen.

2013-10-22 Thread Bill Spitzak
On 10/22/2013 05:59 PM, Jason Ekstrand wrote: I see what you mean here. However, I think apps doing this will cause more trouble than it's worth. One thing about current sloppy focus implementations is that you can click anywhere in the window to raise it. You want to change this. However, w

RE: [PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-10-22 Thread Zhang, Xiong Y
Yes, per compositor clone mode is the same as X server clone mode. Per output clone mode is more convenient and usable. I will implement it using a "clone" config option in the output section of Weston.ini file. thanks From: Jason Ekstrand [mailto:ja...@jlekstrand.net] Sent: Wednesday, October 23

Re: [PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-10-22 Thread Jason Ekstrand
Xiong, I'm not sure that we need to go that far right now. I'm fine for now with just a config option. My primary concern is that you should be able to have three outputs A, B, and C where A and B are masters and C is cloned to A. In your original implementation it looked to me like it was only

RE: [PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-10-22 Thread Zhang, Xiong Y
So you want to adjust output's work mode (clone or extend) at runtime. Is this correct a new protocol should be added ? thanks From: Jason Ekstrand [mailto:ja...@jlekstrand.net] Sent: Wednesday, October 23, 2013 9:52 AM To: Zhang, Xiong Y Cc: wayland-devel@lists.freedesktop.org Subject: Re: [PATCH

Re: [PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-10-22 Thread Jason Ekstrand
Xiong, A "clone" option would be one way to configure it. I just don't want to be tied to a single master output. --Jason On Tue, Oct 22, 2013 at 8:46 PM, Zhang, Xiong Y wrote: > Jason, > > You mean that we can add a “clone” config option in output section of > Weston.ini file. > > Th

[RFC 5/5] simple-shm: Add fullscreen shell support

2013-10-22 Thread Jason Ekstrand
This makes simple-shm act like a very simple fullscreen shell client. This is the kind of interaction one would expect out of a boot splash screen or similar. --- clients/.gitignore | 2 ++ clients/Makefile.am | 4 clients/simple-shm.c | 32 +--- 3 files chan

[RFC 4/5] Add a wl_fullscreen_shell implementation

2013-10-22 Thread Jason Ekstrand
--- configure.ac | 8 + src/Makefile.am| 12 ++ src/fullscreen-shell.c | 574 + 3 files changed, 594 insertions(+) create mode 100644 src/fullscreen-shell.c diff --git a/configure.ac b/configure.ac index cfd4540..815e3c5 100644

[RFC 3/5] Add a signal for when a seat updates its capabilities

2013-10-22 Thread Jason Ekstrand
--- src/compositor.h | 1 + src/input.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/compositor.h b/src/compositor.h index 5b813fc..78e19b9 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -463,6 +463,7 @@ struct weston_seat { struct weston_output *output; /* cons

[RFC 2/5] Generate/build the fullscreen shell protocol files

2013-10-22 Thread Jason Ekstrand
--- protocol/Makefile.am | 1 + src/.gitignore | 3 +++ src/Makefile.am | 5 + 3 files changed, 9 insertions(+) diff --git a/protocol/Makefile.am b/protocol/Makefile.am index 924e48f..2117a14 100644 --- a/protocol/Makefile.am +++ b/protocol/Makefile.am @@ -8,4 +8,5 @@ EXTRA_DIST =

[RFC 1/5] Add a fullscreen shell protocol

2013-10-22 Thread Jason Ekstrand
--- protocol/fullscreen-shell.xml | 44 +++ 1 file changed, 44 insertions(+) create mode 100644 protocol/fullscreen-shell.xml diff --git a/protocol/fullscreen-shell.xml b/protocol/fullscreen-shell.xml new file mode 100644 index 000..b696828 --- /dev/nu

[RFC 0/5] Add a wl_fullscreen_shell protocol and Weston

2013-10-22 Thread Jason Ekstrand
This is a second edition RFC for a fullscreen shell protocol. The first version (along with my intentions for the protocol) can be found here: http://lists.freedesktop.org/archives/wayland-devel/2013-August/010720.html Since there wasn't a whole lot of dissent in the previous email, I will not r

RE: [PATCH 0/9] implement multi screen clone mode in drm-backend.so

2013-10-22 Thread Zhang, Xiong Y
Jason, You mean that we can add a "clone" config option in output section of Weston.ini file. The "clone" config option decide whether this output is a slave output and which master output this slave output clone from . Is my understand correct ? thanks From: Jason Ekstrand [mailto:ja...@jleks

Re: [PATCH 2/2] protocol: add state set functions for maximized and fullscreen.

2013-10-22 Thread Jason Ekstrand
On Tue, Oct 22, 2013 at 3:36 PM, Bill Spitzak wrote: > Jason Ekstrand wrote: > > I think I would disagree on this one. As an avid sloppy-focus user, I >> really don't want apps arbitrarily deciding that they are click-to-focus. >> While some things (look and feel) are entirely cosmetic, if how

Re: [PATCH weston] Add a way to update the keymap

2013-10-22 Thread Kristian Høgsberg
On Thu, Oct 10, 2013 at 07:53:12PM +0200, Rui Tiago Cação Matos wrote: > Hi, > > On 7 October 2013 20:16, Ran Benita wrote: > > At least retaining the locked modifiers (and therefore the LED state in > > most cases) would be nice, and not too problematic I think (though some > > edge cases are ex

Re: [PATCH] egl: refcount wl_egl_window objects. fix memory corruption

2013-10-22 Thread Kristian Høgsberg
On Mon, Oct 07, 2013 at 10:09:17PM +0200, Giulio Camuffo wrote: > Suppose we create a wl_egl_window and an EGLSurface. Then we call > eglMakeCurrent(dpy,surf,surf,ctx) with that surface, render and swap. > Later we destroy the surface and the window, and we make current > another surface. That resu

Re: [PATCH] wayland: Don't leak wl_drm global when unbinding display

2013-10-22 Thread Kristian Høgsberg
On Wed, Oct 16, 2013 at 03:04:03PM +0300, Ander Conselvan de Oliveira wrote: > From: Ander Conselvan de Oliveira > > --- > src/egl/wayland/wayland-drm/wayland-drm.c |7 +-- > 1 file changed, 5 insertions(+), 2 deletions(-) Thanks, applied. Kristian > diff --git a/src/egl/wayland/wayla

Re: [PATCH 3/3] xwayland: Handle keymap changes

2013-10-22 Thread Kristian Høgsberg
On Mon, Oct 21, 2013 at 02:41:54PM +0200, Rui Matos wrote: > --- > hw/xfree86/xwayland/xwayland-input.c | 39 > +--- > include/input.h | 2 +- > 2 files changed, 37 insertions(+), 4 deletions(-) > > diff --git a/hw/xfree86/xwayland/xwayland-i

Re: [PATCH] xwayland: Handle the wl_keyboard modifiers event

2013-10-22 Thread Daniel Stone
On 22 October 2013 21:05, Bill Spitzak wrote: > Are "latched modifiers" things like the Compose Key and dead-key accent > prefixes? No, they're more akin to StickyKeys. > I think this is usually dropped when the focus changes. > > It also seems like these should be handled by the input method. I

Re: [PATCH 2/2] protocol: add state set functions for maximized and fullscreen.

2013-10-22 Thread Bill Spitzak
Jason Ekstrand wrote: I think I would disagree on this one. As an avid sloppy-focus user, I really don't want apps arbitrarily deciding that they are click-to-focus. While some things (look and feel) are entirely cosmetic, if how apps get focus is app-dependent, it will drive users crazy.

Re: [PATCH] xwayland: Handle the wl_keyboard modifiers event

2013-10-22 Thread Bill Spitzak
Are "latched modifiers" things like the Compose Key and dead-key accent prefixes? I think this is usually dropped when the focus changes. It also seems like these should be handled by the input method. I don't like the fact that clients can figure out European composed characters without corr

Re: [PATCH 2/2] compositor: finish frame if redraw fails

2013-10-22 Thread Kristian Høgsberg
On Tue, Oct 22, 2013 at 05:11:26PM +0200, David Herrmann wrote: > If we are about to finish a frame, but a redraw is pending and we let the > compositor redraw, we need to check for errors. If the redraw fails and > the backend cannot schedule a page-flip, we need to finish the frame, > anyway. >

Re: [RFC] clients: add simple-dmabuf

2013-10-22 Thread David Herrmann
Hi On Mon, Oct 21, 2013 at 11:32 PM, David Herrmann wrote: > simple-dmabuf is an example client which shows how to write wayland > clients that use render-nodes for hardware-accelerated rendering and pass > the buffer via dmabuf to the compositor. No mesa/EGL extensions are > needed! Instead we p

[PATCH 1/2] compositor-drm: finish frame if initial page-flip fails

2013-10-22 Thread David Herrmann
If the initial page-flip fails, immediately finish the frame to avoid being stuck in the given frame. We already do this if we have no fbo available. Now we do the same if the page-flip fails. --- src/compositor-drm.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff

[PATCH 2/2] compositor: finish frame if redraw fails

2013-10-22 Thread David Herrmann
If we are about to finish a frame, but a redraw is pending and we let the compositor redraw, we need to check for errors. If the redraw fails and the backend cannot schedule a page-flip, we need to finish the frame, anyway. All backends except DRM use a timer to schedule frames. Hence, they cannot

Re: [PATCH v2 4/4] launcher: add logind backend

2013-10-22 Thread David Herrmann
Hi On Tue, Oct 22, 2013 at 1:56 AM, Kristian Høgsberg wrote: > On Tue, Oct 22, 2013 at 12:28:09AM +0200, David Herrmann wrote: >> Instead of connecting to weston-launch from launcher-util, we now try to >> connect to logind first. If logind provides session-devices, we use them. >> If not, we fal

[PATCH] xwayland: Handle the wl_keyboard modifiers event

2013-10-22 Thread Rui Matos
This allows us to keep track of latched and locked modifiers as well as the XKB group while the keyboard focus is on another wayland client. Note that we don't need to track depressed modifiers since wayland guarantees that we'll get them as key press events whenever we get the keyboard focus. ---

[PATCH v2 1/3] xkb: Repurpose XkbCopyDeviceKeymap to apply a given keymap to a device

2013-10-22 Thread Rui Matos
This will also make it useful for cases when we have a new keymap to apply to a device but don't have a source device. --- On 21 October 2013 19:04, Daniel Stone wrote: > CopyKeyClass is only called when device->key is set. True, amended. > But for the rest: > Reviewed-by: Daniel Stone Thanks

Re: SIGBUS when writing to a wl_shm surface on a full tmpfs / ftruncate() vs fallocate()

2013-10-22 Thread Olivier Blin
On 21/10/2013 22:37, Kristian Høgsberg wrote: On Wed, Oct 16, 2013 at 07:29:47PM +0200, Olivier BLIN wrote: > Hi, > > When creating a wl_shm pool with os_create_anonymous_file(), the > underlying storage file is created on a tmpfs, and its size is set > with ftruncate(). > Though, when the tmpfs