[weston PATCH v6 1/2] add implementation for set_maximised
Bill Spitzak
spitzak at gmail.com
Fri Feb 3 11:14:30 PST 2012
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).
Rather than add redundant (and possibly inconsistent) output choosing
code, I would reuse this rectangle to choose the output.
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".
More information about the wayland-devel
mailing list