[Wayland-bugs] [Bug 75382] Implement wl_probe, or something similar

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Mar 22 23:50:35 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=75382

--- Comment #4 from Pekka Paalanen <ppaalanen at gmail.com> ---
(In reply to x414e54 from comment #3)
> I prefer just being able to give the compositor a hint of what it should do
> if it does not fit. Something like flip-x, flip-y, resize-w, resize-h,
> nothing, scale parent surface. 
> 
> Though I think compositors will already automatically do some of this
> depending on if it is a popup or child/transient surface.
> 
> Probing does not make sense as if your surface is full-screen on one output
> and normal on another output you would have to place the sub-surface inside
> the main surface on all outputs even if it would be fine in the correct
> position on the non full-screen output. 
> 
> If you give the compositor a hint and let it take care of it then it can
> place it differently on different outputs.

Sorry, but I don't think any of that makes sense.

Menus usually want to be aligned somehow to some widget (of which the
compositor has no knowledge of at all) like a menu-bar "button". The compositor
does not have the knowledge to reposition the surface to keep the GUI aligments
that the application toolkit wants to have. I suppose you could remedy that by
giving the compositor the rect around which the popup should be aligned, but
that's getting comlicated and moves some of the popup placement policy into the
compositor, away from the toolkit.

Resize would be basically the same as probe, except you'd probably get visual
flicker. Probing is simpler. Scaling wouldn't work at all, because it would
mess up the GUI scale and visual appearance.

Menus are of type xdg_popup. Child or transient surface are not xdg_popups,
because xdg_popup implies that the GUI needs a grab to operate as expected. If
you don't want or need a grab, it's not a xdg_popup. Grabs can also be denied,
so it's always possible the xdg_popup will be dismissed before it gets shown,
but that just normal race avoidance.

You cannot have a wl_surface fullscreen on one output and normal on another
output. A wl_surface can have just one xdg_surface, and so it cannot be
fullscreen and normal at the same time, even if the visual appearance of the
surface allowed both, which it usually doesn't.

If the compositor is showing the wl_surface in several places, it also knows
what it is doing with those places, and will know how the probe needs to
behave. The client will always assume the window is in one place, and I believe
it also needs to know where the popup surface is wrt. the parent surface.

Also, nothing here is about sub-surfaces. They are a completely different
thing. You do not implement menus as sub-surfaces, because you can't get the
grab behaviour you need.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-bugs/attachments/20150323/79afdba2/attachment-0001.html>


More information about the wayland-bugs mailing list