[QNX] Incorporate screen event thread
It no longer makes sense to allow the screen event thread to be disabled. This was the case only when there existed a BlackBerry event dispatcher that could play its role. Change-Id: I38471dc5cb2a4461da568c89f71e678aef57c43b Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
This commit is contained in:
parent
8984c42d17
commit
44c402b4bf
@ -5,8 +5,6 @@ QT += platformsupport-private core-private gui-private
|
||||
# Uncomment this to build with support for IMF once it becomes available in the BBNDK
|
||||
#CONFIG += qqnx_imf
|
||||
|
||||
CONFIG += qqnx_screeneventthread
|
||||
|
||||
# Uncomment these to enable debugging output for various aspects of the plugin
|
||||
#DEFINES += QQNXBUFFER_DEBUG
|
||||
#DEFINES += QQNXBUTTON_DEBUG
|
||||
@ -45,7 +43,8 @@ SOURCES = main.cpp \
|
||||
qqnxservices.cpp \
|
||||
qqnxcursor.cpp \
|
||||
qqnxrasterwindow.cpp \
|
||||
qqnxglobal.cpp
|
||||
qqnxglobal.cpp \
|
||||
qqnxscreeneventthread.cpp
|
||||
|
||||
HEADERS = main.h \
|
||||
qqnxbuffer.h \
|
||||
@ -65,13 +64,8 @@ HEADERS = main.h \
|
||||
qqnxrasterwindow.h \
|
||||
qqnxscreeneventfilter.h \
|
||||
qqnxglobal.h \
|
||||
qqnxlgmon.h
|
||||
|
||||
CONFIG(qqnx_screeneventthread) {
|
||||
DEFINES += QQNX_SCREENEVENTTHREAD
|
||||
SOURCES += qqnxscreeneventthread.cpp
|
||||
HEADERS += qqnxscreeneventthread.h
|
||||
}
|
||||
qqnxlgmon.h \
|
||||
qqnxscreeneventthread.h
|
||||
|
||||
LIBS += -lscreen
|
||||
|
||||
|
@ -40,9 +40,7 @@
|
||||
#include "qqnxglobal.h"
|
||||
|
||||
#include "qqnxintegration.h"
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
#include "qqnxscreeneventthread.h"
|
||||
#endif
|
||||
#include "qqnxnativeinterface.h"
|
||||
#include "qqnxrasterbackingstore.h"
|
||||
#include "qqnxscreen.h"
|
||||
@ -125,9 +123,7 @@ static inline QQnxIntegration::Options parseOptions(const QStringList ¶mList
|
||||
|
||||
QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
||||
: QPlatformIntegration()
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
, m_screenEventThread(0)
|
||||
#endif
|
||||
, m_navigatorEventHandler(new QQnxNavigatorEventHandler())
|
||||
, m_virtualKeyboard(0)
|
||||
#if defined(QQNX_PPS)
|
||||
@ -169,10 +165,8 @@ QQnxIntegration::QQnxIntegration(const QStringList ¶mList)
|
||||
#endif
|
||||
|
||||
// Create/start event thread
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
m_screenEventThread = new QQnxScreenEventThread(ms_screenContext, m_screenEventHandler);
|
||||
m_screenEventThread->start();
|
||||
#endif
|
||||
|
||||
#if defined(QQNX_PPS)
|
||||
// Create/start the keyboard class.
|
||||
@ -235,10 +229,8 @@ QQnxIntegration::~QQnxIntegration()
|
||||
#endif
|
||||
delete m_navigatorEventHandler;
|
||||
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
// Stop/destroy screen event thread
|
||||
delete m_screenEventThread;
|
||||
#endif
|
||||
|
||||
// In case the event-dispatcher was never transferred to QCoreApplication
|
||||
delete m_eventDispatcher;
|
||||
|
@ -48,9 +48,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
class QQnxScreenEventThread;
|
||||
#endif
|
||||
class QQnxFileDialogHelper;
|
||||
class QQnxNativeInterface;
|
||||
class QQnxWindow;
|
||||
@ -142,9 +140,7 @@ private:
|
||||
static void removeWindow(screen_window_t qnxWindow);
|
||||
|
||||
static screen_context_t ms_screenContext;
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
QQnxScreenEventThread *m_screenEventThread;
|
||||
#endif
|
||||
QQnxNavigatorEventHandler *m_navigatorEventHandler;
|
||||
QQnxAbstractVirtualKeyboard *m_virtualKeyboard;
|
||||
#if defined(QQNX_PPS)
|
||||
|
@ -40,9 +40,7 @@
|
||||
#include "qqnxglobal.h"
|
||||
|
||||
#include "qqnxscreeneventhandler.h"
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
#include "qqnxscreeneventthread.h"
|
||||
#endif
|
||||
#include "qqnxintegration.h"
|
||||
#include "qqnxkeytranslator.h"
|
||||
#include "qqnxscreen.h"
|
||||
@ -67,9 +65,7 @@ QQnxScreenEventHandler::QQnxScreenEventHandler(QQnxIntegration *integration)
|
||||
, m_lastButtonState(Qt::NoButton)
|
||||
, m_lastMouseWindow(0)
|
||||
, m_touchDevice(0)
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
, m_eventThread(0)
|
||||
#endif
|
||||
, m_focusLostTimer(-1)
|
||||
{
|
||||
// Create a touch device
|
||||
@ -198,7 +194,6 @@ void QQnxScreenEventHandler::injectKeyboardEvent(int flags, int sym, int modifie
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
void QQnxScreenEventHandler::setScreenEventThread(QQnxScreenEventThread *eventThread)
|
||||
{
|
||||
m_eventThread = eventThread;
|
||||
@ -233,7 +228,6 @@ void QQnxScreenEventHandler::processEventsFromScreenThread()
|
||||
|
||||
m_eventThread->unlock();
|
||||
}
|
||||
#endif
|
||||
|
||||
void QQnxScreenEventHandler::handleKeyboardEvent(screen_event_t event)
|
||||
{
|
||||
|
@ -48,9 +48,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
class QQnxIntegration;
|
||||
class QQnxScreenEventFilter;
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
class QQnxScreenEventThread;
|
||||
#endif
|
||||
|
||||
class QQnxScreenEventHandler : public QObject
|
||||
{
|
||||
@ -66,9 +64,7 @@ public:
|
||||
|
||||
static void injectKeyboardEvent(int flags, int sym, int mod, int scan, int cap);
|
||||
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
void setScreenEventThread(QQnxScreenEventThread *eventThread);
|
||||
#endif
|
||||
|
||||
Q_SIGNALS:
|
||||
void newWindowCreated(void *window);
|
||||
@ -77,10 +73,8 @@ Q_SIGNALS:
|
||||
protected:
|
||||
void timerEvent(QTimerEvent *event);
|
||||
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
private Q_SLOTS:
|
||||
void processEventsFromScreenThread();
|
||||
#endif
|
||||
|
||||
private:
|
||||
void handleKeyboardEvent(screen_event_t event);
|
||||
@ -105,9 +99,7 @@ private:
|
||||
QTouchDevice *m_touchDevice;
|
||||
QWindowSystemInterface::TouchPoint m_touchPoints[MaximumTouchPoints];
|
||||
QList<QQnxScreenEventFilter*> m_eventFilters;
|
||||
#if defined(QQNX_SCREENEVENTTHREAD)
|
||||
QQnxScreenEventThread *m_eventThread;
|
||||
#endif
|
||||
int m_focusLostTimer;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user