Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/wayland_output.cpp
Show All 18 Lines | |||||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "wayland_output.h" | 20 | #include "wayland_output.h" | ||
21 | #include "wayland_backend.h" | 21 | #include "wayland_backend.h" | ||
22 | 22 | | |||
23 | #include "wayland_server.h" | 23 | #include "wayland_server.h" | ||
24 | 24 | | |||
25 | #include <KWayland/Client/pointerconstraints.h> | 25 | #include <KWayland/Client/pointerconstraints.h> | ||
26 | #include <KWayland/Client/surface.h> | 26 | #include <KWayland/Client/surface.h> | ||
27 | #include <KWayland/Client/shell.h> | | |||
28 | 27 | | |||
29 | #include <KWayland/Server/display.h> | 28 | #include <KWayland/Server/display.h> | ||
30 | 29 | | |||
31 | #include <KLocalizedString> | 30 | #include <KLocalizedString> | ||
32 | 31 | | |||
33 | namespace KWin | 32 | namespace KWin | ||
34 | { | 33 | { | ||
35 | namespace Wayland | 34 | namespace Wayland | ||
Show All 33 Lines | |||||
69 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | 68 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | ||
70 | { | 69 | { | ||
71 | // TODO: set mode to have updated pixelSize | 70 | // TODO: set mode to have updated pixelSize | ||
72 | Q_UNUSED(pixelSize) | 71 | Q_UNUSED(pixelSize) | ||
73 | 72 | | |||
74 | setGlobalPos(logicalPosition); | 73 | setGlobalPos(logicalPosition); | ||
75 | } | 74 | } | ||
76 | 75 | | |||
77 | ShellOutput::ShellOutput(Surface *surface, Shell *shell, WaylandBackend *backend) | | |||
78 | : WaylandOutput(surface, backend) | | |||
79 | { | | |||
80 | auto shellSurface = shell->createSurface(surface, this); | | |||
81 | shellSurface->setToplevel(); | | |||
82 | } | | |||
83 | | ||||
84 | ShellOutput::~ShellOutput() | | |||
85 | { | | |||
86 | m_shellSurface->destroy(); | | |||
87 | delete m_shellSurface; | | |||
88 | } | | |||
89 | | ||||
90 | XdgShellOutput::XdgShellOutput(Surface *surface, XdgShell *xdgShell, WaylandBackend *backend, int number) | 76 | XdgShellOutput::XdgShellOutput(Surface *surface, XdgShell *xdgShell, WaylandBackend *backend, int number) | ||
91 | : WaylandOutput(surface, backend) | 77 | : WaylandOutput(surface, backend) | ||
92 | , m_number(number) | 78 | , m_number(number) | ||
93 | { | 79 | { | ||
94 | m_xdgShellSurface = xdgShell->createSurface(surface, this); | 80 | m_xdgShellSurface = xdgShell->createSurface(surface, this); | ||
95 | updateWindowTitle(); | 81 | updateWindowTitle(); | ||
96 | 82 | | |||
97 | connect(m_xdgShellSurface, &XdgShellSurface::configureRequested, this, &XdgShellOutput::handleConfigure); | 83 | connect(m_xdgShellSurface, &XdgShellSurface::configureRequested, this, &XdgShellOutput::handleConfigure); | ||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |