Removing edges in wl_shell_surface::configure
Bill Spitzak
spitzak at gmail.com
Mon Jul 9 11:06:04 PDT 2012
Any comments on this? Somebody else just posted a question about
removing client-side decorations, which this would allow if all the bits
are turned on.
Basically, what (if anything) is wayland doing about the fact that
surfaces attached to the edges of outputs and/or maximized should either
not draw the "edges" (ie the 3-d effect on current windows and the
shadow) or should have these "edges" clipped off somehow.
If there is an api to tell the client to not draw certain edges, it can
certainly tell the client not to draw anything, too.
On 06/27/2012 10:01 PM, Bill Spitzak wrote:
> Considering there were some hints that the wayland protocol might get
> frozen soon, I think I better ask about some of my concerns with it.
>
> In order to duplicate popular window management actions for sticking to
> output edges, tiling, and maximizing windows, I think the
> wl_shell_surface::configure event will need to tell the client that
> certain edges of the windows should not be drawn.
>
> For instance dragging the window to snap to an edge of an output wants
> to remove the shading and shadow on that edge. The only alternative I
> can think of would require the clients to communicate the border
> thicknesses to the compositor and it would have to clip it off. And the
> client would still waste time drawing the unwanted graphic and must
> avoid putting anything important there because it cannot know if it is
> clipped.
>
> Currently the event has an "edges" field, which is used to indicate what
> part of the window is being dragged for resizing. I believe the purpose
> of this was so that if the client wanted to choose a different size, it
> would move the dragged corner, leaving the other corner fixed, by
> setting the surface position. However in current wayland the client has
> no control over the surface position, so I believe this field is not
> used, correct?
>
> My proposal is to either change this field or add a new one to indicate
> what edges and parts of the window should *not* be drawn by the client.
> There would be a bit for each edge. Maximized windows would indicate
> that all 4 edges must not be drawn. Windows-style 1/2 screen snap may
> indicate that 3 edges must not be drawn. Opposite edges being specified
> are also a hint to the client that it should really avoid resizing the
> window in that direction.
>
> There could also be a bit for the titlebar. Fullscreen would turn this
> on. It might also be specified by window managers that have other ways
> to identify windows or when it is running under a rootless X server that
> insists on adding borders to all windows. I think clients can ignore
> this if there is important client data in the titlebar.
>
> Any opinions? Is perhaps Wayland addressing this problem in some other way?
More information about the wayland-devel
mailing list