[RFC Weston 00/10] Sub-surfaces v2

Giulio Camuffo giuliocamuffo at gmail.com
Sat Feb 23 03:05:20 PST 2013


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?

- 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?


Giulio


More information about the wayland-devel mailing list