Changeset View
Changeset View
Standalone View
Standalone View
keyboard_input.cpp
Show All 27 Lines | |||||
28 | #include "workspace.h" | 28 | #include "workspace.h" | ||
29 | // KWayland | 29 | // KWayland | ||
30 | #include <KWayland/Server/datadevice_interface.h> | 30 | #include <KWayland/Server/datadevice_interface.h> | ||
31 | #include <KWayland/Server/seat_interface.h> | 31 | #include <KWayland/Server/seat_interface.h> | ||
32 | //screenlocker | 32 | //screenlocker | ||
33 | #include <KScreenLocker/KsldApp> | 33 | #include <KScreenLocker/KsldApp> | ||
34 | // Frameworks | 34 | // Frameworks | ||
35 | #include <KKeyServer> | 35 | #include <KKeyServer> | ||
36 | #include <KLocalizedString> | ||||
36 | #include <KGlobalAccel> | 37 | #include <KGlobalAccel> | ||
37 | // Qt | 38 | // Qt | ||
38 | #include <QDBusConnection> | 39 | #include <QDBusConnection> | ||
39 | #include <QDBusMessage> | 40 | #include <QDBusMessage> | ||
40 | #include <QDBusPendingCall> | 41 | #include <QDBusPendingCall> | ||
41 | #include <QKeyEvent> | 42 | #include <QKeyEvent> | ||
42 | #include <QTemporaryFile> | 43 | #include <QTemporaryFile> | ||
43 | // xkbcommon | 44 | // xkbcommon | ||
▲ Show 20 Lines • Show All 336 Lines • ▼ Show 20 Line(s) | 378 | if (layout != m_currentLayout) { | |||
380 | if (kwinApp()->usesLibinput()) { | 381 | if (kwinApp()->usesLibinput()) { | ||
381 | // only if kwin is in charge of keyboard input | 382 | // only if kwin is in charge of keyboard input | ||
382 | QDBusMessage msg = QDBusMessage::createMethodCall( | 383 | QDBusMessage msg = QDBusMessage::createMethodCall( | ||
383 | QStringLiteral("org.kde.plasmashell"), | 384 | QStringLiteral("org.kde.plasmashell"), | ||
384 | QStringLiteral("/org/kde/osdService"), | 385 | QStringLiteral("/org/kde/osdService"), | ||
385 | QStringLiteral("org.kde.osdService"), | 386 | QStringLiteral("org.kde.osdService"), | ||
386 | QStringLiteral("kbdLayoutChanged")); | 387 | QStringLiteral("kbdLayoutChanged")); | ||
387 | 388 | | |||
388 | msg << QString::fromLocal8Bit(xkb_keymap_layout_get_name(m_keymap, layout)); | 389 | msg << i18nd("xkeyboard-config", xkb_keymap_layout_get_name(m_keymap, layout)); | ||
389 | 390 | | |||
390 | QDBusConnection::sessionBus().asyncCall(msg); | 391 | QDBusConnection::sessionBus().asyncCall(msg); | ||
391 | } | 392 | } | ||
392 | } | 393 | } | ||
393 | if (waylandServer()) { | 394 | if (waylandServer()) { | ||
394 | waylandServer()->seat()->updateKeyboardModifiers(xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_DEPRESSED)), | 395 | waylandServer()->seat()->updateKeyboardModifiers(xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_DEPRESSED)), | ||
395 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LATCHED)), | 396 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LATCHED)), | ||
396 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LOCKED)), | 397 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LOCKED)), | ||
▲ Show 20 Lines • Show All 328 Lines • Show Last 20 Lines |