[PATCH 1/2] Add to output protocol to allow rotate/resize
Kristian Høgsberg
krh at bitplanet.net
Fri Apr 29 13:58:24 PDT 2011
On Fri, Apr 29, 2011 at 11:35 AM, Casey Dahlin <cdahlin at redhat.com> wrote:
> On Fri, Apr 29, 2011 at 09:43:53AM +0200, Benjamin Franzke wrote:
>> 2011/4/29 Casey Dahlin <cdahlin at redhat.com>:
>> > Adds some parameters to the output geometry event. Also adds a move method to
>> > change those parameters.
>> > ---
>> > protocol/wayland.xml | 15 ++++++++++++---
>> > 1 files changed, 12 insertions(+), 3 deletions(-)
>> >
>> > diff --git a/protocol/wayland.xml b/protocol/wayland.xml
>> > index 11976fa..187e961 100644
>> > --- a/protocol/wayland.xml
>> > +++ b/protocol/wayland.xml
>> > @@ -446,12 +446,21 @@
>> > published as global during start up, or when a screen is hot
>> > plugged. -->
>> > <interface name="wl_output" version="1">
>> > - <!-- Notification about the screen size. -->
>> > + <!-- Move or rotate this output's area -->
>> > + <request name="move">
>> > + <arg name="x" type="int"/>
>> > + <arg name="y" type="int"/>
>> > + <arg name="transform_flags" type="uint"/>
>> > + </request>
>>
>> I think we need a general debate first, about how to grant permission
>> to only specific clients to change output configuration.
>> Or even not making it part of the main protocol at all, just being an
>> extension or so.
>> We might not want every application to have control of these things.
>>
>
> xrandr doesn't seem to have much more authentication than this. Its not much
> more dangerous than changing the resolution, which many fairly pedestrian apps
> expect to be able to do (i.e. games). Indeed its potentially a good deal less
> dangerous than fullscreen mode (though that can be fixed with UI), far less
> dangerous than screenshots from a security perspective (and we can't have
> clients render certain effects if they can't get a copy of what's behind them
> to distort), and even a good deal safer than input grabs.
Apps shouldn't generally change the *default* resolution. Games and
such may want to show their window at the native resolution and that's
part of the fullscreen plan:
http://lists.freedesktop.org/archives/wayland-devel/2010-November/000117.html
Of course, the DE config tool will want to be able to change the
default mode and placement of monitors. In that case we're talking
about a specific DE with it's own display configuration tool, and
perhaps the tool can just update the underlying config (GConf or so)
and the compositor picks up the change from there. As a first step
I'd rather just add the extra info to wl_output (list of available
modes, refresh rates, sub pixel layout, connector name etc), and punt
on how to change it for now.
Kristian
More information about the wayland-devel
mailing list