Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/wayland_output.cpp
Show All 19 Lines | |||||
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 | 27 | | |||
28 | #include <KWayland/Server/display.h> | 28 | #include <KWaylandServer/display.h> | ||
29 | 29 | | |||
30 | #include <KLocalizedString> | 30 | #include <KLocalizedString> | ||
31 | 31 | | |||
32 | namespace KWin | 32 | namespace KWin | ||
33 | { | 33 | { | ||
34 | namespace Wayland | 34 | namespace Wayland | ||
35 | { | 35 | { | ||
36 | 36 | | |||
Show All 17 Lines | |||||
54 | WaylandOutput::~WaylandOutput() | 54 | WaylandOutput::~WaylandOutput() | ||
55 | { | 55 | { | ||
56 | m_surface->destroy(); | 56 | m_surface->destroy(); | ||
57 | delete m_surface; | 57 | delete m_surface; | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | 60 | void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | ||
61 | { | 61 | { | ||
62 | KWayland::Server::OutputDeviceInterface::Mode mode; | 62 | KWaylandServer::OutputDeviceInterface::Mode mode; | ||
63 | mode.id = 0; | 63 | mode.id = 0; | ||
64 | mode.size = pixelSize; | 64 | mode.size = pixelSize; | ||
65 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | 65 | mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current; | ||
66 | mode.refreshRate = 60000; // TODO: can we get refresh rate data from Wayland host? | 66 | mode.refreshRate = 60000; // TODO: can we get refresh rate data from Wayland host? | ||
67 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode }); | 67 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", pixelSize, { mode }); | ||
68 | setGeometry(logicalPosition, pixelSize); | 68 | setGeometry(logicalPosition, pixelSize); | ||
69 | setScale(backend()->initialOutputScale()); | 69 | setScale(backend()->initialOutputScale()); | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | 72 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | ||
73 | { | 73 | { | ||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |