[Interest] qt5 window setGeometry and move not work in wayland platform

Giulio Camuffo giuliocamuffo at gmail.com
Mon Aug 11 02:34:59 PDT 2014


2014-08-11 12:20 GMT+03:00 Rutledge Shawn <Shawn.Rutledge at digia.com>:
>
> On 11 Aug 2014, at 9:10 AM, Pier Luigi wrote:
> (top-posting fixed)
>> 2014-08-11 8:13 GMT+02:00 Steve (YiLiang) Zhou <szhou at telecomsys.com>:
>>> Dear all,
>>>
>>> My app has a mainwindow and a QDialog which is a child of mainwindow. And I
>>> want to set the app to the position 0,0.
>>>
>>> I use both setGeometry and move to  0,0. No luck , both failed. The window’s
>>> position is unfixed and may appear to anywhere on the screen.
>
> I was wondering about that too.  I understand that it's generally good policy to leave positioning of generic windows up to the window manager, but sometimes you want to write a dock or taskbar which anchors itself to screen edges, and can animate in and out of view; or a splash screen which is centered on one screen.  What is the right way to do that on Wayland?

The right way is to have a protocol designed for that. A taskbar
should use some taskbar_protocol with a request like
put_on_edge(edge), and the compositor will then move the surface on
the edge and do slide in/out or whatever effect it wants to.

>
>> Clients don't get to set window position with Wayland.
>> You should write a Wayland protocol for that but you need a compositor
>> that speaks that protocol.
>
> Has it not yet been done in existing compositors such as the Qt one or in Weston?

Not in QtCompositor. Weston has a private protocol to set some surface
as a panel, but it is private and weston-specific.

--
Giulio


>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest


More information about the wayland-devel mailing list