Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/wayland/wayland_output.cpp
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | |||||
57 | void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | 57 | void WaylandOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | ||
58 | { | 58 | { | ||
59 | KWayland::Server::OutputDeviceInterface::Mode mode; | 59 | KWayland::Server::OutputDeviceInterface::Mode mode; | ||
60 | mode.id = 0; | 60 | mode.id = 0; | ||
61 | mode.size = pixelSize; | 61 | mode.size = pixelSize; | ||
62 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | 62 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | ||
63 | mode.refreshRate = 60000; // TODO: can we get refresh rate data from Wayland host? | 63 | mode.refreshRate = 60000; // TODO: can we get refresh rate data from Wayland host? | ||
64 | AbstractWaylandOutput::initWaylandOutputDevice("model_TODO", "manufacturer_TODO", | 64 | AbstractWaylandOutput::initWaylandOutputDevice("model_TODO", "manufacturer_TODO", | ||
65 | "UUID_TODO", { mode }); | 65 | "UUID_TODO", pixelSize, { mode }); | ||
66 | setRawPhysicalSize(pixelSize); | | |||
67 | setEnabled(true); | 66 | setEnabled(true); | ||
68 | setGeometry(logicalPosition, pixelSize); | 67 | setGeometry(logicalPosition, pixelSize); | ||
69 | setScale(backend()->initialOutputScale()); | 68 | setScale(backend()->initialOutputScale()); | ||
70 | } | 69 | } | ||
71 | 70 | | |||
72 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | 71 | void WaylandOutput::setGeometry(const QPoint &logicalPosition, const QSize &pixelSize) | ||
73 | { | 72 | { | ||
74 | // TODO: set mode to have updated pixelSize | 73 | // TODO: set mode to have updated pixelSize | ||
75 | setRawPhysicalSize(pixelSize); | 74 | Q_UNUSED(pixelSize) | ||
75 | | ||||
76 | setGlobalPos(logicalPosition); | 76 | setGlobalPos(logicalPosition); | ||
77 | } | 77 | } | ||
78 | 78 | | |||
79 | ShellOutput::ShellOutput(Surface *surface, Shell *shell, WaylandBackend *backend) | 79 | ShellOutput::ShellOutput(Surface *surface, Shell *shell, WaylandBackend *backend) | ||
80 | : WaylandOutput(surface, backend) | 80 | : WaylandOutput(surface, backend) | ||
81 | { | 81 | { | ||
82 | auto shellSurface = shell->createSurface(surface, this); | 82 | auto shellSurface = shell->createSurface(surface, this); | ||
83 | shellSurface->setToplevel(); | 83 | shellSurface->setToplevel(); | ||
▲ Show 20 Lines • Show All 111 Lines • Show Last 20 Lines |