Window positions under wayland
ikorot01 at gmail.com
Fri Aug 5 01:34:17 UTC 2022
On Thu, Aug 4, 2022 at 8:09 PM Thiago Macieira <thiago at kde.org> wrote:
> On Thursday, 4 August 2022 16:01:23 PDT Carsten Haitzler wrote:
> > there might be bigger picture ideas BEHIND that like "i have a password
> > dialog for my db app" - then great. make that dialog as such and make sure
> > the compositor knows what window it is a dialog for and a good
> > wm/compositor will just magically open it centered over the parent window
> > (or over the top center or bottom-right corner or whatever the policy that
> > wm has for dialogs is - but at least it's now consistent for all apps with
> > dialogs - if that is what the wm does - enforce consistency). if the
> > wm/compositor does stupid things with dialogs and places them at $RANDOM
> > positions then feel free to yell at the compositor for being stupid. there
> > are very many fewer wm and compositors out there to yell at than there are
> > applications to yell at, so it's more scalable to have the fixes put in
> > compositors not apps. if you absolutely MUST have fine control over this ..
> > as i said - you can render in-line in your window, use subsurfaces etc. but
> > then you are limited as i described.
> Indeed, this is mostly an X/Y problem.
> You have an X problem (unrelated to X11, just using the letter of the
> alphabet) and you think you need Y to achieve it, as in the example above: in
> order to properly place some dialog, the application needed to get the
> absolute position of the window it's going to be relative to and then position
> the new window at a specific absolute position. So we get people coming and
> asking about how to do Y (this implementation).
> Instead, we need to know what the X problem was: properly positioning the sub-
> window or sibling window, or application window reappearing close to where
> you've last seen it. There are probably better ways of solving that problem
> than the reintroducing all the legacy that Carsten is talking about.
Please check my reply to Carsten.
You will see 2 code snippets and the explanation of some stuff I'm looking
for as well as a critique of Carsten's sample.
I do think some samples are legitimate, but doing what Wayland is doing is not
a solution for them.
> This is why Wayland developers keep saying that absolute positions being
> unavailable is a feature, not a bug. There may come a time when the number of
> protocol extensions to support all the little things that one could do with
> absolute positioning becomes a burden, but we're not there and have yet to see
> a problem that can't be solved differently.
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
> Software Architect - Intel DCAI Cloud Engineering
More information about the wayland-devel