Introduce dedicated debug category for everything xkbcommon related

master
Martin Gräßlin 9 years ago
parent 7ac1b02d15
commit 2205c98ec2

@ -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

@ -43,6 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <sys/mman.h>
#include <unistd.h>
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;
}

@ -26,6 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QPointer>
#include <QPointF>
#include <QLoggingCategory>
Q_DECLARE_LOGGING_CATEGORY(KWIN_XKB)
class QWindow;
struct xkb_context;
struct xkb_keymap;

Loading…
Cancel
Save