Removing edges in wl_shell_surface::configure

Bill Spitzak spitzak at gmail.com
Wed Jun 27 22:01:37 PDT 2012


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