Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
52 | #include <KWayland/Server/server_decoration_interface.h> | 52 | #include <KWayland/Server/server_decoration_interface.h> | ||
53 | #include <KWayland/Server/server_decoration_palette_interface.h> | 53 | #include <KWayland/Server/server_decoration_palette_interface.h> | ||
54 | #include <KWayland/Server/shadow_interface.h> | 54 | #include <KWayland/Server/shadow_interface.h> | ||
55 | #include <KWayland/Server/subcompositor_interface.h> | 55 | #include <KWayland/Server/subcompositor_interface.h> | ||
56 | #include <KWayland/Server/blur_interface.h> | 56 | #include <KWayland/Server/blur_interface.h> | ||
57 | #include <KWayland/Server/shell_interface.h> | 57 | #include <KWayland/Server/shell_interface.h> | ||
58 | #include <KWayland/Server/outputmanagement_interface.h> | 58 | #include <KWayland/Server/outputmanagement_interface.h> | ||
59 | #include <KWayland/Server/outputconfiguration_interface.h> | 59 | #include <KWayland/Server/outputconfiguration_interface.h> | ||
60 | #include <KWayland/Server/xdgdecoration_interface.h> | ||||
60 | #include <KWayland/Server/xdgshell_interface.h> | 61 | #include <KWayland/Server/xdgshell_interface.h> | ||
61 | #include <KWayland/Server/xdgforeign_interface.h> | 62 | #include <KWayland/Server/xdgforeign_interface.h> | ||
62 | #include <KWayland/Server/xdgoutput_interface.h> | 63 | #include <KWayland/Server/xdgoutput_interface.h> | ||
63 | 64 | | |||
64 | 65 | | |||
65 | // Qt | 66 | // Qt | ||
66 | #include <QDir> | 67 | #include <QDir> | ||
67 | #include <QFileInfo> | 68 | #include <QFileInfo> | ||
▲ Show 20 Lines • Show All 162 Lines • ▼ Show 20 Line(s) | 187 | { | |||
230 | connect(m_xdgShell6, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>); | 231 | connect(m_xdgShell6, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>); | ||
231 | connect(m_xdgShell6, &XdgShellInterface::xdgPopupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>); | 232 | connect(m_xdgShell6, &XdgShellInterface::xdgPopupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>); | ||
232 | 233 | | |||
233 | m_xdgShell = m_display->createXdgShell(XdgShellInterfaceVersion::Stable, m_display); | 234 | m_xdgShell = m_display->createXdgShell(XdgShellInterfaceVersion::Stable, m_display); | ||
234 | m_xdgShell->create(); | 235 | m_xdgShell->create(); | ||
235 | connect(m_xdgShell, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>); | 236 | connect(m_xdgShell, &XdgShellInterface::surfaceCreated, this, &WaylandServer::createSurface<XdgShellSurfaceInterface>); | ||
236 | connect(m_xdgShell, &XdgShellInterface::xdgPopupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>); | 237 | connect(m_xdgShell, &XdgShellInterface::xdgPopupCreated, this, &WaylandServer::createSurface<XdgShellPopupInterface>); | ||
237 | 238 | | |||
239 | m_xdgDecorationManager = m_display->createXdgDecorationManager(m_xdgShell, m_display); | ||||
240 | m_xdgDecorationManager->create(); | ||||
241 | connect(m_xdgDecorationManager, &XdgDecorationManagerInterface::xdgDecorationInterfaceCreated, this, [this] (XdgDecorationInterface *deco) { | ||||
242 | if (ShellClient *client = findClient(deco->surface()->surface())) { | ||||
243 | client->installXdgDecoration(deco); | ||||
244 | } | ||||
245 | }); | ||||
246 | | ||||
238 | m_display->createShm(); | 247 | m_display->createShm(); | ||
239 | m_seat = m_display->createSeat(m_display); | 248 | m_seat = m_display->createSeat(m_display); | ||
240 | m_seat->create(); | 249 | m_seat->create(); | ||
241 | m_display->createPointerGestures(PointerGesturesInterfaceVersion::UnstableV1, m_display)->create(); | 250 | m_display->createPointerGestures(PointerGesturesInterfaceVersion::UnstableV1, m_display)->create(); | ||
242 | m_display->createPointerConstraints(PointerConstraintsInterfaceVersion::UnstableV1, m_display)->create(); | 251 | m_display->createPointerConstraints(PointerConstraintsInterfaceVersion::UnstableV1, m_display)->create(); | ||
243 | auto ddm = m_display->createDataDeviceManager(m_display); | 252 | auto ddm = m_display->createDataDeviceManager(m_display); | ||
244 | ddm->create(); | 253 | ddm->create(); | ||
245 | connect(ddm, &DataDeviceManagerInterface::dataDeviceCreated, this, | 254 | connect(ddm, &DataDeviceManagerInterface::dataDeviceCreated, this, | ||
▲ Show 20 Lines • Show All 565 Lines • Show Last 20 Lines |