我创建了一个示例 Qt Wayland 合成器,QML 代码如下所示:
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.0
import QtWayland.Compositor 1.0
WaylandCompositor{
id:comp
WaylandOutput{
compositor:comp
sizeFollowsWindow:true
window:Window{
visible:true
width:700
height:700
Repeater{
model:shellSurfaces
ShellSurfaceItem{
shellSurface:modelData
onSurfaceDestroyed:shellSurfaces.remove(index)
}
}
}
}
ListModel{id:shellSurfaces}
WlShell{
onWlShellSurfaceCreated:{
shellSurfaces.append({shellSurface:shellSurface});
}
}
}
--platform wayland
我知道我可以在命令之后使用打开一个摆动窗口。如何在 Wayland 合成器中打开其他软件窗口(例如 Firefox)?
(我不了解显示服务器和 Wayland 合成器的基础知识。我认为我创建的合成器就像一个窗口管理器,我在其中打开的应用程序应该在合成器中打开,因为它在窗口中打开经理)。