Wayland protocol clarification questions
jadahl at gmail.com
Tue May 2 09:11:13 UTC 2023
On Tue, May 02, 2023 at 11:50:55AM +0300, Pekka Paalanen wrote:
> On Sun, 30 Apr 2023 10:29:31 +0200
> Tarek Sander <tsanderdev at gmail.com> wrote:
> > Hello,
> > I want to write a Wayland compositor and while reading the protocol
> > specification, I noticed some things that aren't clear to me:
> > - How does the input and opaque region of a surface behave on a resize?
> > Do the additional pixels get automatically added for the input region?
> Resize works by the client sending requests to change the wl_surface
> size. If it also wants to change input or opaque regions, it must do so
> explicitly. Automatic changes to these regions do not exist, both
> requests have the wording:
> Otherwise, the pending and current regions are never changed...
> > - Is it valid for the wp_presentation_feedback::kind bitfield to contain
> > no flag at all?
> > - What exactly is the anchor rectangle of an xdg_positioner?
> The compositor decides the positioning of popups in order to keep them
> from going e.g. off-screen, and the positioner gives the rules how such
> surface can be positioned without breaking the UI look. Personally I've
> never looked at the details, so maybe someone else will answer this.
The anchor rectangle for a positionar and a popup is the rectangle on
the parent surface the popup will positioned against, given all the
rules set up using the xdg_positioner interface.
It could for example be the rectangle corresponding to the hamburger
menu button where the popup opening above or below (in y-coordinates).
The gtk4 docs for GdkPopupLayout has some illustrations that might help:
More information about the wayland-devel