Wayland Window Management Proposal

Bill Spitzak spitzak at gmail.com
Wed May 11 11:06:54 PDT 2011



cat wrote:
> If I understand the proposal correctly this shouldn't be a problem. If 
> the application becomes unresponsive the server has the ability to 
> manage it (move, resize, raise, lower, possibly hide/show, and an option 
> to kill it) and it knows if it didn't respond to events.
> 
> I do think that there is one thing it should also have, when a client is 
> going to appear/move/resize, it should send a request to the server with 
> a tag, a nospace string to identify the request, the new location, and 
> new dimentions.
> the server responds with a message that has the same tag, and a yes or 
> no response (possibly a hint as to why it was rejected), and if the 
> resonce is no then the client should not preform that particular 
> operation. this at its basics can prevent applications from accidentally 
> moving off screen, covering some more important window(like a taskbar), 
> or from acting as a floating window in a tiling environment, and allows 
> the server the freedom to do something more advanced.

You may be right. Instead of what I proposed where a client sends 
messages indicating it *did* something, it can instead send messages 
that indicate it *wants* to do something. All actions would happen after 
the compositor sends messages to the client, and they would all still be 
performed by the client so they can be atomic.

If a client on it's own decided it wanted to resize, this is what should 
happen:

  1. It would send a resize-request message to the compositor.

  2. The compositor would adjust the size to what it requires. It would 
then send the adjusted resize-request back to the client

  3. The client could then further adjust the resize-request but it 
should not move sides of the window where the 'edge' flag is set. This 
allows it to obey any internal rules about a grid or aspect ratio. It 
then resizes the window and draws the resized contents and decorations.

Any resizes generated by the compositor (either due to the client 
telling the compositor to do resize/drag tracking, or due to a popup 
menu or Alt+click override or tiling adjustments) would cause the 
compositor to send a resize-request to the client, identical to step 2 
above.


More information about the wayland-devel mailing list