Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
60 | #include <KWayland/Server/blur_interface.h> | 60 | #include <KWayland/Server/blur_interface.h> | ||
61 | #include <KWayland/Server/shell_interface.h> | 61 | #include <KWayland/Server/shell_interface.h> | ||
62 | #include <KWayland/Server/outputmanagement_interface.h> | 62 | #include <KWayland/Server/outputmanagement_interface.h> | ||
63 | #include <KWayland/Server/outputconfiguration_interface.h> | 63 | #include <KWayland/Server/outputconfiguration_interface.h> | ||
64 | #include <KWayland/Server/xdgdecoration_interface.h> | 64 | #include <KWayland/Server/xdgdecoration_interface.h> | ||
65 | #include <KWayland/Server/xdgshell_interface.h> | 65 | #include <KWayland/Server/xdgshell_interface.h> | ||
66 | #include <KWayland/Server/xdgforeign_interface.h> | 66 | #include <KWayland/Server/xdgforeign_interface.h> | ||
67 | #include <KWayland/Server/xdgoutput_interface.h> | 67 | #include <KWayland/Server/xdgoutput_interface.h> | ||
68 | 68 | #include <KWayland/Server/keystate_interface.h> | |||
69 | 69 | | |||
70 | // Qt | 70 | // Qt | ||
71 | #include <QDir> | 71 | #include <QDir> | ||
72 | #include <QFileInfo> | 72 | #include <QFileInfo> | ||
73 | #include <QThread> | 73 | #include <QThread> | ||
74 | #include <QWindow> | 74 | #include <QWindow> | ||
75 | 75 | | |||
76 | // system | 76 | // system | ||
▲ Show 20 Lines • Show All 293 Lines • ▼ Show 20 Line(s) | 201 | { | |||
370 | m_xdgOutputManager = m_display->createXdgOutputManager(m_display); | 370 | m_xdgOutputManager = m_display->createXdgOutputManager(m_display); | ||
371 | m_xdgOutputManager->create(); | 371 | m_xdgOutputManager->create(); | ||
372 | 372 | | |||
373 | m_display->createSubCompositor(m_display)->create(); | 373 | m_display->createSubCompositor(m_display)->create(); | ||
374 | 374 | | |||
375 | m_XdgForeign = m_display->createXdgForeignInterface(m_display); | 375 | m_XdgForeign = m_display->createXdgForeignInterface(m_display); | ||
376 | m_XdgForeign->create(); | 376 | m_XdgForeign->create(); | ||
377 | 377 | | |||
378 | m_keyState = m_display->createKeyStateInterface(m_display); | ||||
379 | m_keyState->create(); | ||||
380 | | ||||
378 | return true; | 381 | return true; | ||
379 | } | 382 | } | ||
380 | 383 | | |||
381 | SurfaceInterface *WaylandServer::findForeignTransientForSurface(SurfaceInterface *surface) | 384 | SurfaceInterface *WaylandServer::findForeignTransientForSurface(SurfaceInterface *surface) | ||
382 | { | 385 | { | ||
383 | return m_XdgForeign->transientFor(surface); | 386 | return m_XdgForeign->transientFor(surface); | ||
384 | } | 387 | } | ||
385 | 388 | | |||
▲ Show 20 Lines • Show All 365 Lines • ▼ Show 20 Line(s) | |||||
751 | 754 | | |||
752 | void WaylandServer::simulateUserActivity() | 755 | void WaylandServer::simulateUserActivity() | ||
753 | { | 756 | { | ||
754 | if (m_idle) { | 757 | if (m_idle) { | ||
755 | m_idle->simulateUserActivity(); | 758 | m_idle->simulateUserActivity(); | ||
756 | } | 759 | } | ||
757 | } | 760 | } | ||
758 | 761 | | |||
762 | void WaylandServer::updateKeyState(KWin::Xkb::LEDs leds) | ||||
763 | { | ||||
764 | if (!m_keyState) | ||||
765 | return; | ||||
766 | | ||||
767 | m_keyState->setState(KeyStateInterface::Key::CapsLock, leds & KWin::Xkb::LED::CapsLock ? KeyStateInterface::State::Locked : KeyStateInterface::State::Unlocked); | ||||
768 | m_keyState->setState(KeyStateInterface::Key::NumLock, leds & KWin::Xkb::LED::NumLock ? KeyStateInterface::State::Locked : KeyStateInterface::State::Unlocked); | ||||
769 | m_keyState->setState(KeyStateInterface::Key::ScrollLock, leds & KWin::Xkb::LED::ScrollLock ? KeyStateInterface::State::Locked : KeyStateInterface::State::Unlocked); | ||||
770 | } | ||||
771 | | ||||
759 | } | 772 | } |