Changeset View
Changeset View
Standalone View
Standalone View
keyboard_input.cpp
Show First 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 298 | if (layout != m_currentLayout) { | |||
---|---|---|---|---|---|
303 | QStringLiteral("/org/kde/osdService"), | 303 | QStringLiteral("/org/kde/osdService"), | ||
304 | QStringLiteral("org.kde.osdService"), | 304 | QStringLiteral("org.kde.osdService"), | ||
305 | QStringLiteral("kbdLayoutChanged")); | 305 | QStringLiteral("kbdLayoutChanged")); | ||
306 | 306 | | |||
307 | msg << QString::fromLocal8Bit(xkb_keymap_layout_get_name(m_keymap, layout)); | 307 | msg << QString::fromLocal8Bit(xkb_keymap_layout_get_name(m_keymap, layout)); | ||
308 | 308 | | |||
309 | QDBusConnection::sessionBus().asyncCall(msg); | 309 | QDBusConnection::sessionBus().asyncCall(msg); | ||
310 | } | 310 | } | ||
311 | if (waylandServer()) { | ||||
311 | waylandServer()->seat()->updateKeyboardModifiers(xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_DEPRESSED)), | 312 | waylandServer()->seat()->updateKeyboardModifiers(xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_DEPRESSED)), | ||
312 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LATCHED)), | 313 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LATCHED)), | ||
313 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LOCKED)), | 314 | xkb_state_serialize_mods(m_state, xkb_state_component(XKB_STATE_MODS_LOCKED)), | ||
314 | layout); | 315 | layout); | ||
315 | } | 316 | } | ||
317 | } | ||||
316 | 318 | | |||
317 | xkb_keysym_t Xkb::toKeysym(uint32_t key) | 319 | xkb_keysym_t Xkb::toKeysym(uint32_t key) | ||
318 | { | 320 | { | ||
319 | if (!m_state) { | 321 | if (!m_state) { | ||
320 | return XKB_KEY_NoSymbol; | 322 | return XKB_KEY_NoSymbol; | ||
321 | } | 323 | } | ||
322 | return xkb_state_key_get_one_sym(m_state, key + 8); | 324 | return xkb_state_key_get_one_sym(m_state, key + 8); | ||
323 | } | 325 | } | ||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |