[libinput] Add dedicated logging category for libinput
parent
57c521c214
commit
fe28ca1d8a
|
@ -460,6 +460,7 @@ if(HAVE_INPUT)
|
|||
libinput/context.cpp
|
||||
libinput/connection.cpp
|
||||
libinput/events.cpp
|
||||
libinput/libinput_logging.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "events.h"
|
||||
#include "../logind.h"
|
||||
#include "../udev.h"
|
||||
#include "libinput_logging.h"
|
||||
|
||||
#include <QDebug>
|
||||
#include <QSocketNotifier>
|
||||
|
||||
#include <libinput.h>
|
||||
|
@ -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;
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#include "libinput_logging.h"
|
||||
Q_LOGGING_CATEGORY(KWIN_LIBINPUT, "kwin_libinput", QtCriticalMsg);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/********************************************************************
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org>
|
||||
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
*********************************************************************/
|
||||
#ifndef KWIN_LIBINPUT_LOGGING_H
|
||||
#define KWIN_LIBINPUT_LOGGING_H
|
||||
#include <QDebug>
|
||||
#include <QLoggingCategory>
|
||||
Q_DECLARE_LOGGING_CATEGORY(KWIN_LIBINPUT)
|
||||
|
||||
#endif
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue