diff --git a/data/org_kde_kwin.categories b/data/org_kde_kwin.categories index 3e88e37dec..ac3a1013d0 100644 --- a/data/org_kde_kwin.categories +++ b/data/org_kde_kwin.categories @@ -13,3 +13,4 @@ kwin_tabbox KWin Window Switcher kwin_decorations KWin Decorations kwin_scripting KWin Scripting aurorae KWin Aurorae Window Decoration Engine +kwin_xkbcommon KWin xkbcommon integration diff --git a/keyboard_input.cpp b/keyboard_input.cpp index 57ebb279ac..39682e683e 100644 --- a/keyboard_input.cpp +++ b/keyboard_input.cpp @@ -43,6 +43,8 @@ along with this program. If not, see . #include #include +Q_LOGGING_CATEGORY(KWIN_XKB, "kwin_xkbcommon", QtCriticalMsg); + namespace KWin { Xkb::Xkb(InputRedirection *input) @@ -57,14 +59,14 @@ Xkb::Xkb(InputRedirection *input) , m_modifiers(Qt::NoModifier) { if (!m_context) { - qCDebug(KWIN_CORE) << "Could not create xkb context"; + qCDebug(KWIN_XKB) << "Could not create xkb context"; } else { // load default keymap xkb_keymap *keymap = xkb_keymap_new_from_names(m_context, nullptr, XKB_KEYMAP_COMPILE_NO_FLAGS); if (keymap) { updateKeymap(keymap); } else { - qCDebug(KWIN_CORE) << "Could not create default xkb keymap"; + qCDebug(KWIN_XKB) << "Could not create default xkb keymap"; } } } @@ -88,7 +90,7 @@ void Xkb::installKeymap(int fd, uint32_t size) xkb_keymap *keymap = xkb_keymap_new_from_string(m_context, map, XKB_KEYMAP_FORMAT_TEXT_V1, XKB_MAP_COMPILE_PLACEHOLDER); munmap(map, size); if (!keymap) { - qCDebug(KWIN_CORE) << "Could not map keymap from file"; + qCDebug(KWIN_XKB) << "Could not map keymap from file"; return; } updateKeymap(keymap); @@ -99,7 +101,7 @@ void Xkb::updateKeymap(xkb_keymap *keymap) Q_ASSERT(keymap); xkb_state *state = xkb_state_new(keymap); if (!state) { - qCDebug(KWIN_CORE) << "Could not create XKB state"; + qCDebug(KWIN_XKB) << "Could not create XKB state"; xkb_keymap_unref(keymap); return; } diff --git a/keyboard_input.h b/keyboard_input.h index d123a0e662..dbbb75e98f 100644 --- a/keyboard_input.h +++ b/keyboard_input.h @@ -26,6 +26,9 @@ along with this program. If not, see . #include #include +#include +Q_DECLARE_LOGGING_CATEGORY(KWIN_XKB) + class QWindow; struct xkb_context; struct xkb_keymap;