Re: Stacking subsurface siblings

2015-06-19 Thread Bill Spitzak
On Thu, Jun 18, 2015 at 12:14 AM, Pekka Paalanen wrote: > > Arnaud's code: > > surf[BLUE] = surface_create(ctx, NULL, 100, 100, 0, 0, 0xffff); > if (!surf[BLUE]) > die("failed to create root surface"); > > surf[RED] = surface_create(ctx, surf[BLUE], 100

Re: Stacking subsurface siblings

2015-06-18 Thread Pekka Paalanen
On Wed, 17 Jun 2015 09:51:04 -0700 Bill Spitzak wrote: > On Wed, Jun 17, 2015 at 9:35 AM, Bill Spitzak wrote: > > > The problem is that the way it works is *not* a tree, but some kind of > > list. > > > > As described the following code: > > > > wl_subsurface_place_below(RED->subsurface, GREEN-

Re: Stacking subsurface siblings

2015-06-17 Thread Bill Spitzak
On Wed, Jun 17, 2015 at 9:35 AM, Bill Spitzak wrote: > The problem is that the way it works is *not* a tree, but some kind of > list. > > As described the following code: > > wl_subsurface_place_below(RED->subsurface, GREEN->surface); > wl_subsurface_place_below(GREEN->subsurface, BLUE->surface);

Re: Stacking subsurface siblings

2015-06-17 Thread Bill Spitzak
The problem is that the way it works is *not* a tree, but some kind of list. As described the following code: wl_subsurface_place_below(RED->subsurface, GREEN->surface); wl_subsurface_place_below(GREEN->subsurface, BLUE->surface); Produces the order GREEN, RED, BLUE instead. However if you desc

Re: Stacking subsurface siblings

2015-06-17 Thread Pekka Paalanen
On Tue, 16 Jun 2015 23:47:03 +0800 Jonas Ådahl wrote: > On Tue, Jun 16, 2015 at 04:46:55PM +0200, Arnaud Vrac wrote: > > Hi, > > > > I'm wondering if a behaviour of weston related to subsurfaces is either a > > bug or intended. The protocol description is not clear on what happens in > > the fol

Re: Stacking subsurface siblings

2015-06-17 Thread Pekka Paalanen
On Tue, 16 Jun 2015 23:42:43 +0800 Jonas Ådahl wrote: > On Tue, Jun 16, 2015 at 08:02:52AM -0700, Jasper St. Pierre wrote: > > I was not aware you could stack subsurfaces under a parent surface at > > all. Is this intended protocol behavior? The fact that you might be > > able to do that at all i

Re: Stacking subsurface siblings

2015-06-17 Thread Pekka Paalanen
On Tue, 16 Jun 2015 08:02:52 -0700 "Jasper St. Pierre" wrote: > I was not aware you could stack subsurfaces under a parent surface at > all. Is this intended protocol behavior? The fact that you might be > able to do that at all in Weston might be a bug. Yes, stacking behind the parent is intend

Re: Stacking subsurface siblings

2015-06-16 Thread Arnaud Vrac
On Tue, Jun 16, 2015 at 5:47 PM, Jonas Ådahl wrote: > On Tue, Jun 16, 2015 at 04:46:55PM +0200, Arnaud Vrac wrote: > > Hi, > > > > I'm wondering if a behaviour of weston related to subsurfaces is either a > > bug or intended. The protocol description is not clear on what happens in > > the follow

Re: Stacking subsurface siblings

2015-06-16 Thread Jonas Ådahl
On Tue, Jun 16, 2015 at 04:46:55PM +0200, Arnaud Vrac wrote: > Hi, > > I'm wondering if a behaviour of weston related to subsurfaces is either a > bug or intended. The protocol description is not clear on what happens in > the following cases: > > Suppose I have a shell surface (BLUE) and two sub

Re: Stacking subsurface siblings

2015-06-16 Thread Jonas Ådahl
On Tue, Jun 16, 2015 at 08:02:52AM -0700, Jasper St. Pierre wrote: > I was not aware you could stack subsurfaces under a parent surface at > all. Is this intended protocol behavior? The fact that you might be > able to do that at all in Weston might be a bug. From wl_subsurface.place_above: "... T

Re: Stacking subsurface siblings

2015-06-16 Thread Jasper St. Pierre
I was imagining that this was a fullscreen mode, given that you had no UI stacked under the video. The thing about surfaces is that you can configure them as you like every frame. If you have a browser playing multiple videos, each video can be a subsurface, and then when you transition to a fulls

Re: Stacking subsurface siblings

2015-06-16 Thread Arnaud Vrac
It's possible, but the OSD is usually longer lived than the video surfaces, which might be transient. For example in an HTML browser, a declarative UI, etc, multiple video surfaces could be created for some pages and then destroyed when the page is closed. On Tue, Jun 16, 2015 at 5:11 PM, Jasper S

Re: Stacking subsurface siblings

2015-06-16 Thread Jasper St. Pierre
Why can't you use the video as the main surface and an OSD as a subsurface? On Tue, Jun 16, 2015 at 11:09 AM, Arnaud Vrac wrote: > I'm not sure, but I find it very useful for a video player. The video is > stacked under the OSD and to be able to use hardware planes, the only viable > option with

Re: Stacking subsurface siblings

2015-06-16 Thread Arnaud Vrac
I'm not sure, but I find it very useful for a video player. The video is stacked under the OSD and to be able to use hardware planes, the only viable option with wayland is to have a surface for the OSD and a subsurface for the video which is stacked under. On Tue, Jun 16, 2015 at 5:02 PM, Jasper

Re: Stacking subsurface siblings

2015-06-16 Thread Jasper St. Pierre
I was not aware you could stack subsurfaces under a parent surface at all. Is this intended protocol behavior? The fact that you might be able to do that at all in Weston might be a bug. On Tue, Jun 16, 2015 at 7:46 AM, Arnaud Vrac wrote: > Hi, > > I'm wondering if a behaviour of weston related t

Stacking subsurface siblings

2015-06-16 Thread Arnaud Vrac
Hi, I'm wondering if a behaviour of weston related to subsurfaces is either a bug or intended. The protocol description is not clear on what happens in the following cases: Suppose I have a shell surface (BLUE) and two subsurfaces (RED, GREEN). I want to stack them to I get RED, GREEN, BLUE from