[RFC Weston 00/10] Sub-surfaces v2

Pekka Paalanen ppaalanen at gmail.com
Sat Feb 23 12:41:31 PST 2013


On Sat, 23 Feb 2013 12:05:20 +0100
Giulio Camuffo <giuliocamuffo at gmail.com> wrote:

> Hi
> 
> > - a demo client with window decorations stitched from 4
> >   non-overlapping sub-surfaces
> 
> I tought i may write here the problems i've seen when doing window
> decorations this way in QtWayland:
> (http://qt.gitorious.org/~giucam/qt/giucam-qtwayland/commits/csd-subsurface-collage
> warning: very very WIP code, will rebase.)
> 
> - you click on the window decoration to move the shell surface, but
> the shell surface you're trying to move has the main surface as its
> surface so the condition "|| ws->seat.pointer->focus ==
> &shsurf->surface->surface" in weston's shell_surface_move() in
> src/shell.c will fail, and you won't be able to move the window. Same
> thing for resizing.
> solution: make it check if ws->seat.pointer->focus is a subsurface of
> shsurf->surface->surface?

Yeah, I guess we should always look up the main surface, when
something happens wrt. to a sub-surface.

> - if you ask the shell to maximize the shell_surface it will use the
> main surface as the size, so if you apply blindly the width and height
> given by the configure the decorations will be outside the wanted
> perimeter. You can account for the decorations size in the client's
> configure and reduce the width and height, but the main surface
> position will still be at 0,0 so the top decoration will still be
> below the panel, the left one will be outside the screen and you will
> have empty space below and on the right of the window.
> solution: make it use the bounding box of the surface + subsurfaces
> instead of the surface's size?

Oh yes, that is a missing feature: a function to compute the window
rectangle from the set of wl_surfaces. And then use that in
positioning computations in shell.

I did expect to hit these kinds of problems, when I would start
experimenting with the stitched decorations.


Thanks,
pq


More information about the wayland-devel mailing list