[Interest] QWaylandCompositor question
Ralf Van Bogaert
ralf.vanbogaert at gmail.com
Wed Jun 1 16:15:37 CEST 2022
Hello,
I am developing a Qt-based desktop environment, and would like to use
QWaylandCompositor to provide built-in compositing.
I am looking at several QML-based examples like Pure QML
<https://code.qt.io/cgit/qt/qtwayland.git/tree/examples/wayland/pure-qml?h=5.15>,
but I would like to implement it using the C++ classes only.
So I've rewritten it to the best of my ability, and it actually works -
application windows show up in the compositor - except that they do not
update their content. Applications do respond to clicks, and even show
popup menus - but it's hard to tell since the window's content does not
show any feedback.
These same applications work fine in the Pure QML example.
The problem is (I suspect) I am not handling the
QWaylandXdgShell::toplevelCreated(QWaylandXdgToplevel*,QWaylandXdgSurface*)
signal correctly.
Currently the slot it connects to looks like this:
void Compositor::onToplevelCreated(QWaylandXdgToplevel
*toplevel,QWaylandXdgSurface *xdgSurface)
{
QQuickWindow
*outputWindow=static_cast<QQuickWIndow*>(defaultOutput()->window());
QWaylandQuickShellSurfaceItem item(outputWindow->contentItem());
item->setShellSurface(xdgSurface);
}
It is unclear to me how the QML version handles this, since this
functionality is hidden under all that nice syntactic sugar.
Is anyone able to help?
Regards
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220601/7261a1f9/attachment.htm>
More information about the Interest
mailing list