summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/kms
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/kms')
-rw-r--r--src/plugins/platforms/kms/kms.pro7
-rw-r--r--src/plugins/platforms/kms/qkmsintegration.cpp5
-rw-r--r--src/plugins/platforms/kms/qkmsintegration.h4
-rw-r--r--src/plugins/platforms/kms/qkmsvthandler.cpp100
-rw-r--r--src/plugins/platforms/kms/qkmsvthandler.h68
5 files changed, 8 insertions, 176 deletions
diff --git a/src/plugins/platforms/kms/kms.pro b/src/plugins/platforms/kms/kms.pro
index 612a878736..1b3678f13a 100644
--- a/src/plugins/platforms/kms/kms.pro
+++ b/src/plugins/platforms/kms/kms.pro
@@ -21,8 +21,8 @@ SOURCES = main.cpp \
qkmscursor.cpp \
qkmsdevice.cpp \
qkmsbackingstore.cpp \
- qkmsnativeinterface.cpp \
- qkmsvthandler.cpp
+ qkmsnativeinterface.cpp
+
HEADERS = qkmsintegration.h \
qkmsscreen.h \
qkmscontext.h \
@@ -30,8 +30,7 @@ HEADERS = qkmsintegration.h \
qkmscursor.h \
qkmsdevice.h \
qkmsbackingstore.h \
- qkmsnativeinterface.h \
- qkmsvthandler.h
+ qkmsnativeinterface.h
OTHER_FILES += \
kms.json
diff --git a/src/plugins/platforms/kms/qkmsintegration.cpp b/src/plugins/platforms/kms/qkmsintegration.cpp
index 80c5887a28..63c6d08bdc 100644
--- a/src/plugins/platforms/kms/qkmsintegration.cpp
+++ b/src/plugins/platforms/kms/qkmsintegration.cpp
@@ -46,7 +46,6 @@
#include "qkmsbackingstore.h"
#include "qkmscontext.h"
#include "qkmsnativeinterface.h"
-#include "qkmsvthandler.h"
#if !defined(QT_NO_EVDEV)
#include <QtPlatformSupport/private/qevdevmousemanager_p.h>
@@ -56,6 +55,8 @@
#include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h>
#include <QtPlatformSupport/private/qgenericunixfontdatabase_p.h>
+#include <QtPlatformSupport/private/qfbvthandler_p.h>
+
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/QOpenGLContext>
#include <QtGui/QScreen>
@@ -68,7 +69,7 @@ QKmsIntegration::QKmsIntegration()
m_nativeInterface(new QKmsNativeInterface)
{
setenv("EGL_PLATFORM", "drm",1);
- m_vtHandler = new QKmsVTHandler;
+ m_vtHandler = new QFbVtHandler;
m_deviceDiscovery = QDeviceDiscovery::create(QDeviceDiscovery::Device_DRM | QDeviceDiscovery::Device_DRM_PrimaryGPU, 0);
if (m_deviceDiscovery) {
diff --git a/src/plugins/platforms/kms/qkmsintegration.h b/src/plugins/platforms/kms/qkmsintegration.h
index 0a626e6bd2..bba4f53d7c 100644
--- a/src/plugins/platforms/kms/qkmsintegration.h
+++ b/src/plugins/platforms/kms/qkmsintegration.h
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
class QKmsScreen;
class QKmsDevice;
-class QKmsVTHandler;
+class QFbVtHandler;
class QKmsIntegration : public QObject, public QPlatformIntegration
{
@@ -85,7 +85,7 @@ private:
QList<QKmsDevice *> m_devices;
QPlatformFontDatabase *m_fontDatabase;
QPlatformNativeInterface *m_nativeInterface;
- QKmsVTHandler *m_vtHandler;
+ QFbVtHandler *m_vtHandler;
QDeviceDiscovery *m_deviceDiscovery;
};
diff --git a/src/plugins/platforms/kms/qkmsvthandler.cpp b/src/plugins/platforms/kms/qkmsvthandler.cpp
deleted file mode 100644
index 5e5afd3161..0000000000
--- a/src/plugins/platforms/kms/qkmsvthandler.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qkmsvthandler.h>
-#include <QtCore/private/qcrashhandler_p.h>
-#include <QtGui/private/qguiapplication_p.h>
-#include <sys/ioctl.h>
-#include <linux/vt.h>
-#include <linux/kd.h>
-
-#ifdef K_OFF
-#define KBD_OFF_MODE K_OFF
-#else
-#define KBD_OFF_MODE K_RAW
-#endif
-
-QT_BEGIN_NAMESPACE
-
-QKmsVTHandler *QKmsVTHandler::self = 0;
-
-QKmsVTHandler::QKmsVTHandler(QObject *parent)
- : QObject(parent), m_tty(-1)
-{
- Q_ASSERT(!self);
- self = this;
-
- if (!isatty(0))
- return;
-
- m_tty = 0;
-
- ioctl(m_tty, KDGKBMODE, &m_oldKbdMode);
- if (!qgetenv("QT_KMS_TTYKBD").toInt()) {
- ioctl(m_tty, KDSKBMODE, KBD_OFF_MODE);
- QGuiApplicationPrivate *appd = QGuiApplicationPrivate::instance();
- Q_ASSERT(appd);
- QSegfaultHandler::initialize(appd->argv, appd->argc);
- QSegfaultHandler::installCrashHandler(crashHandler);
- }
-}
-
-QKmsVTHandler::~QKmsVTHandler()
-{
- self->cleanup();
- self = 0;
-}
-
-void QKmsVTHandler::cleanup()
-{
- if (m_tty == -1)
- return;
-
- ioctl(m_tty, KDSKBMODE, m_oldKbdMode);
-}
-
-void QKmsVTHandler::crashHandler()
-{
- Q_ASSERT(self);
- self->cleanup();
-}
-
-QT_END_NAMESPACE
diff --git a/src/plugins/platforms/kms/qkmsvthandler.h b/src/plugins/platforms/kms/qkmsvthandler.h
deleted file mode 100644
index 8c4f511bc8..0000000000
--- a/src/plugins/platforms/kms/qkmsvthandler.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the plugins of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Digia gives you certain additional
-** rights. These rights are described in the Digia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QKMSVTHANDLER_H
-#define QKMSVTHANDLER_H
-
-#include <QObject>
-
-QT_BEGIN_NAMESPACE
-
-class QKmsVTHandler : public QObject
-{
- Q_OBJECT
-
-public:
- QKmsVTHandler(QObject *parent = 0);
- ~QKmsVTHandler();
-
-private:
- void cleanup();
- static void crashHandler();
-
- static QKmsVTHandler *self;
- int m_tty;
- int m_oldKbdMode;
-};
-
-QT_END_NAMESPACE
-
-#endif