Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/windowed/x11windowed_output.cpp
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 47 | { | |||
---|---|---|---|---|---|
48 | xcb_unmap_window(m_backend->connection(), m_window); | 48 | xcb_unmap_window(m_backend->connection(), m_window); | ||
49 | xcb_destroy_window(m_backend->connection(), m_window); | 49 | xcb_destroy_window(m_backend->connection(), m_window); | ||
50 | delete m_winInfo; | 50 | delete m_winInfo; | ||
51 | xcb_flush(m_backend->connection()); | 51 | xcb_flush(m_backend->connection()); | ||
52 | } | 52 | } | ||
53 | 53 | | |||
54 | void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | 54 | void X11WindowedOutput::init(const QPoint &logicalPosition, const QSize &pixelSize) | ||
55 | { | 55 | { | ||
56 | KWayland::Server::OutputDeviceInterface::Mode mode; | 56 | KWaylandServer::OutputDeviceInterface::Mode mode; | ||
57 | mode.id = 0; | 57 | mode.id = 0; | ||
58 | mode.size = pixelSize; | 58 | mode.size = pixelSize; | ||
59 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | 59 | mode.flags = KWaylandServer::OutputDeviceInterface::ModeFlag::Current; | ||
60 | mode.refreshRate = 60000; // TODO: get refresh rate via randr | 60 | mode.refreshRate = 60000; // TODO: get refresh rate via randr | ||
61 | 61 | | |||
62 | // Physicial size must be adjusted, such that QPA calculates correct sizes of | 62 | // Physicial size must be adjusted, such that QPA calculates correct sizes of | ||
63 | // internal elements. | 63 | // internal elements. | ||
64 | const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale(); | 64 | const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale(); | ||
65 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode }); | 65 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode }); | ||
66 | setGeometry(logicalPosition, pixelSize); | 66 | setGeometry(logicalPosition, pixelSize); | ||
67 | setScale(m_backend->initialOutputScale()); | 67 | setScale(m_backend->initialOutputScale()); | ||
▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines |