diff --git a/CMakeLists.txt b/CMakeLists.txt
index 034bb23a8c..b1e27f5ade 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -460,6 +460,7 @@ if(HAVE_INPUT)
libinput/context.cpp
libinput/connection.cpp
libinput/events.cpp
+ libinput/libinput_logging.cpp
)
endif()
diff --git a/data/org_kde_kwin.categories b/data/org_kde_kwin.categories
index 6f909fc591..ec476c4990 100644
--- a/data/org_kde_kwin.categories
+++ b/data/org_kde_kwin.categories
@@ -8,4 +8,5 @@ kwin_wayland_framebuffer KWin Wayland (Framebuffer backend)
kwin_wayland_hwcomposer KWin Wayland (hwcomposer backend)
kwin_wayland_backend KWin Wayland (Wayland backend)
kwin_wayland_x11windowed KWin Wayland (X11 backend)
+kwin_libinput KWin Libinput Integration
aurorae KWin Aurorae Window Decoration Engine
diff --git a/libinput/connection.cpp b/libinput/connection.cpp
index a4d20bbc8e..04825bb873 100644
--- a/libinput/connection.cpp
+++ b/libinput/connection.cpp
@@ -22,8 +22,8 @@ along with this program. If not, see .
#include "events.h"
#include "../logind.h"
#include "../udev.h"
+#include "libinput_logging.h"
-#include
#include
#include
@@ -48,20 +48,20 @@ Connection *Connection::create(QObject *parent)
Q_ASSERT(!s_self);
static Udev s_udev;
if (!s_udev.isValid()) {
- qWarning() << "Failed to initialize udev";
+ qCWarning(KWIN_LIBINPUT) << "Failed to initialize udev";
return nullptr;
}
if (!s_context) {
s_context = new Context(s_udev);
if (!s_context->isValid()) {
- qWarning() << "Failed to create context from udev";
+ qCWarning(KWIN_LIBINPUT) << "Failed to create context from udev";
delete s_context;
s_context = nullptr;
return nullptr;
}
// TODO: don't hardcode seat name
if (!s_context->assignSeat("seat0")) {
- qWarning() << "Failed to assign seat seat0";
+ qCWarning(KWIN_LIBINPUT) << "Failed to assign seat seat0";
delete s_context;
s_context = nullptr;
return nullptr;
diff --git a/libinput/libinput_logging.cpp b/libinput/libinput_logging.cpp
new file mode 100644
index 0000000000..89dec0f69c
--- /dev/null
+++ b/libinput/libinput_logging.cpp
@@ -0,0 +1,22 @@
+/********************************************************************
+ KWin - the KDE window manager
+ This file is part of the KDE project.
+
+Copyright (C) 2015 Martin Gräßlin
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*********************************************************************/
+#include "libinput_logging.h"
+Q_LOGGING_CATEGORY(KWIN_LIBINPUT, "kwin_libinput", QtCriticalMsg);
+
diff --git a/libinput/libinput_logging.h b/libinput/libinput_logging.h
new file mode 100644
index 0000000000..a91b52d0e5
--- /dev/null
+++ b/libinput/libinput_logging.h
@@ -0,0 +1,26 @@
+/********************************************************************
+ KWin - the KDE window manager
+ This file is part of the KDE project.
+
+Copyright (C) 2015 Martin Gräßlin
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+*********************************************************************/
+#ifndef KWIN_LIBINPUT_LOGGING_H
+#define KWIN_LIBINPUT_LOGGING_H
+#include
+#include
+Q_DECLARE_LOGGING_CATEGORY(KWIN_LIBINPUT)
+
+#endif
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index fff83cac5a..0a008b8922 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -24,6 +24,7 @@ if (HAVE_INPUT)
${KWIN_SOURCE_DIR}/libinput/context.cpp
${KWIN_SOURCE_DIR}/libinput/connection.cpp
${KWIN_SOURCE_DIR}/libinput/events.cpp
+ ${KWIN_SOURCE_DIR}/libinput/libinput_logging.cpp
${KWIN_SOURCE_DIR}/logind.cpp
${KWIN_SOURCE_DIR}/udev.cpp
)