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 35 Lines | |||||
71 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | 70 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | ||
72 | { | 71 | { | ||
73 | // TODO: set mode to have updated pixelSize | 72 | // TODO: set mode to have updated pixelSize | ||
74 | Q_UNUSED(pixelSize) | 73 | Q_UNUSED(pixelSize) | ||
75 | 74 | | |||
76 | setGlobalPos(logicalPosition); | 75 | setGlobalPos(logicalPosition); | ||
77 | } | 76 | } | ||
78 | 77 | | |||
79 | ShellOutput::ShellOutput(Surface *surface, Shell *shell, WaylandBackend *backend) | | |||
80 | : WaylandOutput(surface, backend) | | |||
81 | { | | |||
82 | auto shellSurface = shell->createSurface(surface, this); | | |||
83 | shellSurface->setToplevel(); | | |||
84 | } | | |||
85 | | ||||
86 | ShellOutput::~ShellOutput() | | |||
87 | { | | |||
88 | m_shellSurface->destroy(); | | |||
89 | delete m_shellSurface; | | |||
90 | } | | |||
91 | | ||||
92 | XdgShellOutput::XdgShellOutput(Surface *surface, XdgShell *xdgShell, WaylandBackend *backend, int number) | 78 | XdgShellOutput::XdgShellOutput(Surface *surface, XdgShell *xdgShell, WaylandBackend *backend, int number) | ||
93 | : WaylandOutput(surface, backend) | 79 | : WaylandOutput(surface, backend) | ||
94 | , m_number(number) | 80 | , m_number(number) | ||
95 | { | 81 | { | ||
96 | m_xdgShellSurface = xdgShell->createSurface(surface, this); | 82 | m_xdgShellSurface = xdgShell->createSurface(surface, this); | ||
97 | updateWindowTitle(); | 83 | updateWindowTitle(); | ||
98 | 84 | | |||
99 | connect(m_xdgShellSurface, &XdgShellSurface::configureRequested, this, &XdgShellOutput::handleConfigure); | 85 | connect(m_xdgShellSurface, &XdgShellSurface::configureRequested, this, &XdgShellOutput::handleConfigure); | ||
▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines |