Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/windowed/x11windowed_output.cpp
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 51 | { | |||
---|---|---|---|---|---|
53 | mode.id = 0; | 53 | mode.id = 0; | ||
54 | mode.size = pixelSize; | 54 | mode.size = pixelSize; | ||
55 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | 55 | mode.flags = KWayland::Server::OutputDeviceInterface::ModeFlag::Current; | ||
56 | mode.refreshRate = 60000; // TODO: get refresh rate via randr | 56 | mode.refreshRate = 60000; // TODO: get refresh rate via randr | ||
57 | 57 | | |||
58 | // Physicial size must be adjusted, such that QPA calculates correct sizes of | 58 | // Physicial size must be adjusted, such that QPA calculates correct sizes of | ||
59 | // internal elements. | 59 | // internal elements. | ||
60 | const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale(); | 60 | const QSize physicalSize = pixelSize / 96.0 * 25.4 / m_backend->initialOutputScale(); | ||
61 | AbstractWaylandOutput::initWaylandOutputDevice("model_TODO", "manufacturer_TODO", | 61 | initInterfaces("model_TODO", "manufacturer_TODO", "UUID_TODO", physicalSize, { mode }); | ||
62 | "UUID_TODO", physicalSize, { mode }); | | |||
63 | setEnabled(true); | | |||
64 | setGeometry(logicalPosition, pixelSize); | 62 | setGeometry(logicalPosition, pixelSize); | ||
65 | setScale(m_backend->initialOutputScale()); | 63 | setScale(m_backend->initialOutputScale()); | ||
66 | 64 | | |||
67 | uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK; | 65 | uint32_t mask = XCB_CW_BACK_PIXEL | XCB_CW_EVENT_MASK; | ||
68 | const uint32_t values[] = { | 66 | const uint32_t values[] = { | ||
69 | m_backend->screen()->black_pixel, | 67 | m_backend->screen()->black_pixel, | ||
70 | XCB_EVENT_MASK_KEY_PRESS | | 68 | XCB_EVENT_MASK_KEY_PRESS | | ||
71 | XCB_EVENT_MASK_KEY_RELEASE | | 69 | XCB_EVENT_MASK_KEY_RELEASE | | ||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |