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

Pekka Paalanen ppaalanen at gmail.com
Sun Feb 5 23:33:14 PST 2012


On Fri, 03 Feb 2012 11:14:30 -0800
Bill Spitzak <spitzak at gmail.com> wrote:

> Pekka Paalanen wrote:
> 
> > Ah, I forgot in the reply to the protocol bits. Krh said something
> > about wanting the output as a parameter here, explicitly set by the
> > client. There was some scheme about letting clients know which output
> > currently has their surfaces...
> 
> I have written several programs that need to "save the user's preferred 
> layout" and found that what users really want for maximized and 
> fullscreen windows is to also remember the "non-maximized size" (a huge 
> annoyance with Qt is there is no way to set this value except by 
> actually showing the non-maximized window on startup, btw).

As long as clients know nothing about the global coordinate system,
nothing about "remember position" can be completely implemented client
side. I expect at some point we would add shell protocol to achieve
"remember layout" somehow, but I very much doubt it will deliberatly
expose the global coordinate system to the clients.

> Rather than add redundant (and possibly inconsistent) output choosing 
> code, I would reuse this rectangle to choose the output.

The output choosing code in the server would likely take the surface
bounding box, and find the output where most of the surface is. This is
how it already works, when we choose which output to synchronise the
surface to.

> The easiest way I see to do this is to make the configure request from 
> client to compositor always contain a rectangle as well as flags 
> indicating if maximized, fullscreen, etc are wanted. For maximized and 
> fullscreen the rectangle is assumed to be the window position if it was 
> not maximized, and is used to determine the output surface. Clients who 
> really want a specific output can assume that a small rectangle in the 
> middle of that output will choose it.
> 
> Note the rectangle is not remembered by the compositor. If a client 
> wants to turn off full-screen it sends a new request with the rectangle 
> (or a different one...) and the fullscreen bits turned off.
> 
> The main reason for this is to reduce the amount of 
> possibly-inconsistent data that must be written by a program to "save 
> the current layout".

How would that work without any knowledge of the global coordinate
system in clients?


Thanks,
pq


More information about the wayland-devel mailing list