[weston PATCH v6 1/2] add implementation for set_maximised

Bill Spitzak spitzak at gmail.com
Wed Feb 8 11:27:43 PST 2012


Pekka Paalanen wrote:

> But is there any way to realise a popup window, like a menu, without
> saying that there is a single parent and the popup is relative to that?

I was assuming the client would know the transform for the parent and 
would use it to figure out the transform for the popup. It would then 
use the "raise" protocol to make the menu appear atop the parent.

I am a bit worried about conveying any kind of permanent "this is a 
child window" information to the compositor. I have found that this 
quickly becomes very complex because clients need to change this 
information and it is more complex than a simple tree. "tear-off menus" 
are an example where they will need the ability to change the parent. 
Deleting surfaces also causes a lot of problems.

>> A simple example is the desire to have two "document" windows sharing 
>> the *same* set of overlapping "toolbox" windows. Which document is the 
>> "master"? What happens if the user wants to close it?
> 
> The toolbox windows would not be child windows of anything. Is there any
> reason they should be children to other windows, like menus are?
> You already sketched the raise protocol, that avoids communicating such
> window relations to the server.

Clients want to initially lay out the toolbox windows in a pattern 
around and overlapping the document window. This could be done with a 
non-permanent "parent" that is simply used to concatenate transforms and 
is then forgotten about.

In fact that is perhaps the correct solution: the "parent" is a 
transient piece of information, and is thrown away right after the 
configure request. "child" surfaces will not track the parent surface 
automatically. But the client can just re-configure all the children at 
the same time it reconfigures the parent.

It is also possible Wayland already works this way?

PS: You may also want to consider clients that want to draw the 
transformed image directly (to produce better anti-aliasing).


More information about the wayland-devel mailing list