<p dir="ltr"><br>
On Nov 15, 2013 5:27 AM, "Martin Gräßlin" <<a href="mailto:mgraesslin@kde.org">mgraesslin@kde.org</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> this is a reply to the topic of whether to have information about decorations<br>
> in the xdg_shell at all (see [1]). Sorry that I don't reply to the right<br>
> message, had not been subscribed to the list.<br>
><br>
> I want to outline why we in the KDE Plasma team would prefer to have the<br>
> possibility to tell clients whether to draw decorations or not. In Plasma we<br>
> have multiple shells and will be able to switch at runtime. From the window<br>
> manager perspective the main difference is currently the handling of window<br>
> decorations. Our touch oriented shell doesn't have decorated windows, our<br>
> netbook shell only has decorated windows for dialogs and our desktop shell has<br>
> a typical window decorated style, but not enforcing SSD (there are valid use<br>
> cases like yakuake).<br>
><br>
> This gives us quite some flexibility to adjust at runtime (add keyboard to<br>
> tablet to get a desktop). An application doesn't need to know what the shell<br>
> currently looks like. The shell takes care of handling all of that.<br>
><br>
> If we don't have information about whether the window should be decorated or<br>
> not in the xdg_shell we would need to adjust all applications to know about<br>
> our various shells. Otherwise a consistent user experience would not be<br>
> possible. Also it removes all possibilities to take this further in the<br>
> future.<br>
><br>
> Now I don't want to force SSD to anybody nor do I want to be forced to CSD.<br>
> Therefore I want to have a very simple spec, which allows the compositor to<br>
> tell the clients whether they are expected to render decos themselves (enforce<br>
> CSD, e.g. GNOME Shell), whether the compositor doesn't care, but prefer them<br>
> to not render themselves (e.g. Plasma Desktop case) or whether the compositor<br>
> wants the client to not render any handles at all (enforce SSD, Plasma Active<br>
> case).<br>
><br>
> In addition the client should tell the compositor whether it draws handles or<br>
> not. So that the SSD-supporting compositor doesn't add a decoration around a<br>
> CSD client.<br>
><br>
> I think this would be a good solution. It would require clients to support<br>
> CSD, but also to not render them in shells, which prefer to not have them.<br>
> Also it doesn't force CSD applications to support it. They could just announce<br>
> that they do CSD no matter what.<br>
><br>
> Opinions? Would that be acceptable for everybody?<br>
><br>
> Cheers<br>
> Martin Gräßlin<br>
><br>
> [1] <a href="http://lists.freedesktop.org/archives/wayland-devel/2013-November/011980.html">http://lists.freedesktop.org/archives/wayland-devel/2013-November/011980.html</a></p>
<p dir="ltr">Hi All,<br>
I think I know how we can handle all of the use-cases described above and still deal with Jasper's concerns about no one decorating at all. My suggestion would be to have a pair of flags that get sent with the configure event or in their own event that tells the client how to decorate. (I would vote for their own event to avoid making configure even more monolithic, but that's immaterial.)</p>
<p dir="ltr">The first flag would be the compositor's preference as to whether the client should decorate or not. If 1, the server prefers that the client draws decorations; if 0, the server prefers to handle decorating itself. The second flag would specify whether the first flag is strict or just a suggestion. If 1, the client must do as specified in the first flag; if 0, it is only a suggestion and the client may do otherwise. For the use-cases listed in this thread, this would work out as follows:</p>
<p dir="ltr">1) GNOME shell would always set 11, CSD-strict. Any client that does not draw decorations is considered a bad client and gets what it gets.</p>
<p dir="ltr">2) Fullscreen surfaces will always recieve 01, SSD-strict.</p>
<p dir="ltr">3) KWin's desktop shell would set 00, SSD-suggested. It would prefer that clients let KWin do the decorating but if a client really wants its own decorations, it can.</p>
<p dir="ltr">4) KWin's tablet shell would set 01, SSD-strict to tell clients that they must not decorate. Then it is free to decorate them/tile them at will.</p>
<p dir="ltr">5) KWin's netbook shell would set 00 for dialogues and 01 for main windows.</p>
<p dir="ltr">Somewhere in here we would also need an event to let the client tell the server whether it decided to decorate or not. There's also a race in here that we need to solve, but I think we can handle that.</p>
<p dir="ltr">There's my thoughts. Jasper, Martin, and Rafael. Does this look good to you? I think it solves all the cases. I've got a few more ideas that extend what's given here but, to avoid added bikeshedding, I'm leaving them out for now.</p>
<p dir="ltr">Thanks,<br>
--Jason Ekstrand</p>