summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp23
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h1
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h10
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h6
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h18
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h14
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h2
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.cpp12
-rw-r--r--src/plugins/platforms/xcb/qxcbbackingstore.h18
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbclipboard.h8
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.cpp3
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection.h13
-rw-r--r--src/plugins/platforms/xcb/qxcbconnection_xi2.cpp40
-rw-r--r--src/plugins/platforms/xcb/qxcbcursor.h6
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp6
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.h18
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp8
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.h44
-rw-r--r--src/plugins/platforms/xcb/qxcbmain.cpp2
-rw-r--r--src/plugins/platforms/xcb/qxcbnativeinterface.h24
-rw-r--r--src/plugins/platforms/xcb/qxcbscreen.h28
-rw-r--r--src/plugins/platforms/xcb/qxcbsessionmanager.h16
-rw-r--r--src/plugins/platforms/xcb/qxcbsystemtraytracker.h2
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp12
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h92
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.h2
29 files changed, 236 insertions, 208 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
index 8e1688dbe8..6650ca44ae 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.cpp
@@ -55,29 +55,6 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, directLoader,
(QXcbGlIntegrationFactoryInterface_iid, QLatin1String(""), Qt::CaseInsensitive))
#endif // !QT_NO_LIBRARY
-QStringList QXcbGlIntegrationFactory::keys(const QString &pluginPath)
-{
- QStringList list;
-#ifndef QT_NO_LIBRARY
- if (!pluginPath.isEmpty()) {
- QCoreApplication::addLibraryPath(pluginPath);
- list = directLoader()->keyMap().values();
- if (!list.isEmpty()) {
- const QString postFix = QStringLiteral(" (from ")
- + QDir::toNativeSeparators(pluginPath)
- + QLatin1Char(')');
- const QStringList::iterator end = list.end();
- for (QStringList::iterator it = list.begin(); it != end; ++it)
- (*it).append(postFix);
- }
- }
-#else
- Q_UNUSED(pluginPath);
-#endif
- list.append(loader()->keyMap().values());
- return list;
-}
-
QXcbGlIntegration *QXcbGlIntegrationFactory::create(const QString &platform, const QString &pluginPath)
{
#ifndef QT_NO_LIBRARY
diff --git a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h
index 633b11a505..c4aa0a3d8d 100644
--- a/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h
+++ b/src/plugins/platforms/xcb/gl_integrations/qxcbglintegrationfactory.h
@@ -49,7 +49,6 @@ class QXcbGlIntegration;
class QXcbGlIntegrationFactory
{
public:
- static QStringList keys(const QString &pluginPath = QString());
static QXcbGlIntegration *create(const QString &name, const QString &platformPluginPath = QString());
};
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
index 0cb4a878a1..54a9f5cd83 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglintegration.h
@@ -62,13 +62,13 @@ public:
QXcbEglIntegration();
~QXcbEglIntegration();
- bool initialize(QXcbConnection *connection) Q_DECL_OVERRIDE;
+ bool initialize(QXcbConnection *connection) override;
- QXcbWindow *createWindow(QWindow *window) const Q_DECL_OVERRIDE;
- QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
- QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const Q_DECL_OVERRIDE;
+ QXcbWindow *createWindow(QWindow *window) const override;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
+ QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
- bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE { return true; }
+ bool supportsThreadedOpenGL() const override { return true; }
EGLDisplay eglDisplay() const { return m_egl_display; }
void *xlib_display() const;
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h
index 6e717e4491..7c83d0e240 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglnativeinterfacehandler.h
@@ -55,9 +55,9 @@ public:
QXcbEglNativeInterfaceHandler(QXcbNativeInterface *nativeInterface);
- QPlatformNativeInterface::NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) const Q_DECL_OVERRIDE;
- QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const Q_DECL_OVERRIDE;
- QPlatformNativeInterface::NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) const Q_DECL_OVERRIDE;
+ QPlatformNativeInterface::NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) const override;
+ QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const override;
+ QPlatformNativeInterface::NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) const override;
private:
static void *eglDisplay();
static void *eglDisplayForWindow(QWindow *window);
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h
index 48fc6dce70..3090cef735 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h
@@ -59,11 +59,11 @@ public:
QXcbEglIntegration *glIntegration() const { return m_glIntegration; }
protected:
- void create() Q_DECL_OVERRIDE;
- void resolveFormat(const QSurfaceFormat &format) Q_DECL_OVERRIDE;
+ void create() override;
+ void resolveFormat(const QSurfaceFormat &format) override;
#ifdef XCB_USE_XLIB
- const xcb_visualtype_t *createVisual() Q_DECL_OVERRIDE;
+ const xcb_visualtype_t *createVisual() override;
#endif
private:
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
index bf1f1b324b..3dfe0ac618 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.h
@@ -60,14 +60,14 @@ public:
const QVariant &nativeHandle);
~QGLXContext();
- bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
- void doneCurrent() Q_DECL_OVERRIDE;
- void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
- QFunctionPointer getProcAddress(const char *procName) Q_DECL_OVERRIDE;
+ bool makeCurrent(QPlatformSurface *surface) override;
+ void doneCurrent() override;
+ void swapBuffers(QPlatformSurface *surface) override;
+ QFunctionPointer getProcAddress(const char *procName) override;
- QSurfaceFormat format() const Q_DECL_OVERRIDE;
- bool isSharing() const Q_DECL_OVERRIDE;
- bool isValid() const Q_DECL_OVERRIDE;
+ QSurfaceFormat format() const override;
+ bool isSharing() const override;
+ bool isValid() const override;
GLXContext glxContext() const { return m_context; }
GLXFBConfig glxConfig() const { return m_config; }
@@ -100,8 +100,8 @@ public:
explicit QGLXPbuffer(QOffscreenSurface *offscreenSurface);
~QGLXPbuffer();
- QSurfaceFormat format() const Q_DECL_OVERRIDE { return m_format; }
- bool isValid() const Q_DECL_OVERRIDE { return m_pbuffer != 0; }
+ QSurfaceFormat format() const override { return m_format; }
+ bool isValid() const override { return m_pbuffer != 0; }
GLXPbuffer pbuffer() const { return m_pbuffer; }
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
index 8f04db31b2..26cb233a59 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxintegration.h
@@ -52,15 +52,15 @@ public:
QXcbGlxIntegration();
~QXcbGlxIntegration();
- bool initialize(QXcbConnection *connection) Q_DECL_OVERRIDE;
- bool handleXcbEvent(xcb_generic_event_t *event, uint responseType) Q_DECL_OVERRIDE;
+ bool initialize(QXcbConnection *connection) override;
+ bool handleXcbEvent(xcb_generic_event_t *event, uint responseType) override;
- QXcbWindow *createWindow(QWindow *window) const Q_DECL_OVERRIDE;
- QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
- QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const Q_DECL_OVERRIDE;
+ QXcbWindow *createWindow(QWindow *window) const override;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
+ QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
- virtual bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE;
- virtual bool supportsSwitchableWidgetComposition() const Q_DECL_OVERRIDE;
+ bool supportsThreadedOpenGL() const override;
+ bool supportsSwitchableWidgetComposition() const override;
private:
QXcbConnection *m_connection;
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h
index 1748f2298c..d877732725 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxnativeinterfacehandler.h
@@ -53,7 +53,7 @@ public:
};
QXcbGlxNativeInterfaceHandler(QXcbNativeInterface *nativeInterface);
- QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const Q_DECL_OVERRIDE;
+ QPlatformNativeInterface::NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) const override;
private:
static void *glxContextForContext(QOpenGLContext *context);
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h
index 9519245130..14b2d5e6eb 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qxcbglxwindow.h
@@ -52,7 +52,7 @@ public:
~QXcbGlxWindow();
protected:
- const xcb_visualtype_t *createVisual() Q_DECL_OVERRIDE;
+ const xcb_visualtype_t *createVisual() override;
};
QT_END_NAMESPACE
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.cpp b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
index 3d09b1c139..f095288221 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.cpp
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.cpp
@@ -122,7 +122,7 @@ public:
, m_image(image)
{ }
- bool doLock(AccessTypes access, const QRect &rect) Q_DECL_OVERRIDE
+ bool doLock(AccessTypes access, const QRect &rect) override
{
Q_UNUSED(rect);
if (access & ~(QPlatformGraphicsBuffer::SWReadAccess | QPlatformGraphicsBuffer::SWWriteAccess))
@@ -131,13 +131,13 @@ public:
m_access_lock |= access;
return true;
}
- void doUnlock() Q_DECL_OVERRIDE { m_access_lock = None; }
+ void doUnlock() override { m_access_lock = None; }
- const uchar *data() const Q_DECL_OVERRIDE { return m_image->bits(); }
- uchar *data() Q_DECL_OVERRIDE { return m_image->bits(); }
- int bytesPerLine() const Q_DECL_OVERRIDE { return m_image->bytesPerLine(); }
+ const uchar *data() const override { return m_image->bits(); }
+ uchar *data() override { return m_image->bits(); }
+ int bytesPerLine() const override { return m_image->bytesPerLine(); }
- Origin origin() const Q_DECL_OVERRIDE { return QPlatformGraphicsBuffer::OriginTopLeft; }
+ Origin origin() const override { return QPlatformGraphicsBuffer::OriginTopLeft; }
private:
AccessTypes m_access_lock;
QImage *m_image;
diff --git a/src/plugins/platforms/xcb/qxcbbackingstore.h b/src/plugins/platforms/xcb/qxcbbackingstore.h
index 6af679d28a..2985432b7f 100644
--- a/src/plugins/platforms/xcb/qxcbbackingstore.h
+++ b/src/plugins/platforms/xcb/qxcbbackingstore.h
@@ -57,22 +57,22 @@ public:
QXcbBackingStore(QWindow *widget);
~QXcbBackingStore();
- QPaintDevice *paintDevice() Q_DECL_OVERRIDE;
- void flush(QWindow *window, const QRegion &region, const QPoint &offset) Q_DECL_OVERRIDE;
+ QPaintDevice *paintDevice() override;
+ void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
#ifndef QT_NO_OPENGL
void composeAndFlush(QWindow *window, const QRegion &region, const QPoint &offset,
QPlatformTextureList *textures, QOpenGLContext *context,
- bool translucentBackground) Q_DECL_OVERRIDE;
+ bool translucentBackground) override;
#endif
- QImage toImage() const Q_DECL_OVERRIDE;
+ QImage toImage() const override;
- QPlatformGraphicsBuffer *graphicsBuffer() const Q_DECL_OVERRIDE;
+ QPlatformGraphicsBuffer *graphicsBuffer() const override;
- void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE;
- bool scroll(const QRegion &area, int dx, int dy) Q_DECL_OVERRIDE;
+ void resize(const QSize &size, const QRegion &staticContents) override;
+ bool scroll(const QRegion &area, int dx, int dy) override;
- void beginPaint(const QRegion &) Q_DECL_OVERRIDE;
- void endPaint() Q_DECL_OVERRIDE;
+ void beginPaint(const QRegion &) override;
+ void endPaint() override;
private:
QXcbShmImage *m_image;
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.cpp b/src/plugins/platforms/xcb/qxcbclipboard.cpp
index 38e91cc9f6..cee011bbdf 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbclipboard.cpp
@@ -90,7 +90,7 @@ public:
}
protected:
- QStringList formats_sys() const Q_DECL_OVERRIDE
+ QStringList formats_sys() const override
{
if (isEmpty())
return QStringList();
@@ -120,13 +120,13 @@ protected:
return formatList;
}
- bool hasFormat_sys(const QString &format) const Q_DECL_OVERRIDE
+ bool hasFormat_sys(const QString &format) const override
{
QStringList list = formats();
return list.contains(format);
}
- QVariant retrieveData_sys(const QString &fmt, QVariant::Type requestedType) const Q_DECL_OVERRIDE
+ QVariant retrieveData_sys(const QString &fmt, QVariant::Type requestedType) const override
{
if (fmt.isEmpty() || isEmpty())
return QByteArray();
@@ -238,7 +238,7 @@ public:
}
protected:
- void timerEvent(QTimerEvent *ev) Q_DECL_OVERRIDE
+ void timerEvent(QTimerEvent *ev) override
{
if (ev->timerId() == abort_timer) {
// this can happen when the X client we are sending data
diff --git a/src/plugins/platforms/xcb/qxcbclipboard.h b/src/plugins/platforms/xcb/qxcbclipboard.h
index ffd565c56f..a0a4f4e5a1 100644
--- a/src/plugins/platforms/xcb/qxcbclipboard.h
+++ b/src/plugins/platforms/xcb/qxcbclipboard.h
@@ -59,11 +59,11 @@ public:
QXcbClipboard(QXcbConnection *connection);
~QXcbClipboard();
- QMimeData *mimeData(QClipboard::Mode mode) Q_DECL_OVERRIDE;
- void setMimeData(QMimeData *data, QClipboard::Mode mode) Q_DECL_OVERRIDE;
+ QMimeData *mimeData(QClipboard::Mode mode) override;
+ void setMimeData(QMimeData *data, QClipboard::Mode mode) override;
- bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
- bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
+ bool supportsMode(QClipboard::Mode mode) const override;
+ bool ownsMode(QClipboard::Mode mode) const override;
QXcbScreen *screen() const;
diff --git a/src/plugins/platforms/xcb/qxcbconnection.cpp b/src/plugins/platforms/xcb/qxcbconnection.cpp
index 57ce357a17..2834ff3224 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection.cpp
@@ -1997,8 +1997,7 @@ void QXcbConnection::initializeAllAtoms() {
Q_ASSERT(i == QXcbAtom::NPredefinedAtoms);
- QByteArray settings_atom_name("_QT_SETTINGS_TIMESTAMP_");
- settings_atom_name += m_displayName;
+ const QByteArray settings_atom_name = "_QT_SETTINGS_TIMESTAMP_" + m_displayName;
names[i++] = settings_atom_name;
xcb_intern_atom_cookie_t cookies[QXcbAtom::NAtoms];
diff --git a/src/plugins/platforms/xcb/qxcbconnection.h b/src/plugins/platforms/xcb/qxcbconnection.h
index c9fc27997b..3754890796 100644
--- a/src/plugins/platforms/xcb/qxcbconnection.h
+++ b/src/plugins/platforms/xcb/qxcbconnection.h
@@ -315,7 +315,7 @@ class QXcbEventReader : public QThread
public:
QXcbEventReader(QXcbConnection *connection);
- void run() Q_DECL_OVERRIDE;
+ void run() override;
QXcbEventArray *lock();
void unlock();
@@ -504,6 +504,7 @@ public:
#endif
#ifdef XCB_USE_XINPUT22
+ bool startSystemResizeForTouchBegin(xcb_window_t window, const QPoint &point, Qt::Corner corner);
bool xi2SetMouseGrabEnabled(xcb_window_t w, bool grab);
#endif
Qt::MouseButton xiToQtMouseButton(uint32_t b);
@@ -519,7 +520,7 @@ public:
#endif
protected:
- bool event(QEvent *e) Q_DECL_OVERRIDE;
+ bool event(QEvent *e) override;
public slots:
void flush() { xcb_flush(m_connection); }
@@ -639,6 +640,14 @@ private:
QXcbEventReader *m_reader;
#if defined(XCB_USE_XINPUT2)
QHash<int, XInput2TouchDeviceData*> m_touchDevices;
+#ifdef XCB_USE_XINPUT22
+ struct StartSystemResizeInfo {
+ xcb_window_t window;
+ uint16_t deviceid;
+ uint32_t pointid;
+ Qt::Corner corner;
+ } m_startSystemResizeInfo;
+#endif
#endif
#ifdef Q_XCB_DEBUG
struct CallInfo {
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
index 93f8db92bf..0ace79a4f5 100644
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
@@ -61,9 +61,9 @@ struct XInput2TouchDeviceData {
XIDeviceInfo *xiDeviceInfo;
QTouchDevice *qtTouchDevice;
QHash<int, QWindowSystemInterface::TouchPoint> touchPoints;
+ QHash<int, QPointF> pointPressedPosition; // in screen coordinates where each point was pressed
// Stuff that is relevant only for touchpads
- QHash<int, QPointF> pointPressedPosition; // in screen coordinates where each point was pressed
QPointF firstPressedPosition; // in screen coordinates where the first point was pressed
QPointF firstPressedNormalPosition; // device coordinates (0 to 1, 0 to 1) where the first point was pressed
QSizeF size; // device size in mm
@@ -93,6 +93,7 @@ void QXcbConnection::initializeXInput2()
if (m_xi2Enabled) {
#ifdef XCB_USE_XINPUT22
qCDebug(lcQpaXInputDevices, "XInput version %d.%d is available and Qt supports 2.2 or greater", xiMajor, m_xi2Minor);
+ m_startSystemResizeInfo.window = XCB_NONE;
#else
qCDebug(lcQpaXInputDevices, "XInput version %d.%d is available and Qt supports 2.0", xiMajor, m_xi2Minor);
#endif
@@ -714,7 +715,21 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
touchPoint.state = Qt::TouchPointMoved;
} else if (touchPoint.area.center() != QPoint(x, y)) {
touchPoint.state = Qt::TouchPointMoved;
- dev->pointPressedPosition[touchPoint.id] = QPointF(x, y);
+ if (dev->qtTouchDevice->type() == QTouchDevice::TouchPad)
+ dev->pointPressedPosition[touchPoint.id] = QPointF(x, y);
+ }
+
+ if (dev->qtTouchDevice->type() == QTouchDevice::TouchScreen &&
+ xiDeviceEvent->event == m_startSystemResizeInfo.window &&
+ xiDeviceEvent->sourceid == m_startSystemResizeInfo.deviceid &&
+ xiDeviceEvent->detail == m_startSystemResizeInfo.pointid) {
+ QXcbWindow *window = platformWindowFromId(m_startSystemResizeInfo.window);
+ if (window) {
+ XIAllowTouchEvents(static_cast<Display *>(m_xlib_display), xiDeviceEvent->deviceid,
+ xiDeviceEvent->detail, xiDeviceEvent->event, XIRejectTouch);
+ window->doStartSystemResize(QPoint(x, y), m_startSystemResizeInfo.corner);
+ m_startSystemResizeInfo.window = XCB_NONE;
+ }
}
break;
case XI_TouchEnd:
@@ -745,6 +760,27 @@ void QXcbConnection::xi2ProcessTouch(void *xiDevEvent, QXcbWindow *platformWindo
touchPoint.state = Qt::TouchPointStationary;
}
+bool QXcbConnection::startSystemResizeForTouchBegin(xcb_window_t window, const QPoint &point, Qt::Corner corner)
+{
+ QHash<int, XInput2TouchDeviceData*>::const_iterator devIt = m_touchDevices.constBegin();
+ for (; devIt != m_touchDevices.constEnd(); ++devIt) {
+ XInput2TouchDeviceData *deviceData = devIt.value();
+ if (deviceData->qtTouchDevice->type() == QTouchDevice::TouchScreen) {
+ QHash<int, QPointF>::const_iterator pointIt = deviceData->pointPressedPosition.constBegin();
+ for (; pointIt != deviceData->pointPressedPosition.constEnd(); ++pointIt) {
+ if (pointIt.value().toPoint() == point) {
+ m_startSystemResizeInfo.window = window;
+ m_startSystemResizeInfo.deviceid = devIt.key();
+ m_startSystemResizeInfo.pointid = pointIt.key();
+ m_startSystemResizeInfo.corner = corner;
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
bool QXcbConnection::xi2SetMouseGrabEnabled(xcb_window_t w, bool grab)
{
if (grab && !canGrab())
diff --git a/src/plugins/platforms/xcb/qxcbcursor.h b/src/plugins/platforms/xcb/qxcbcursor.h
index 3284a9e3e1..c15225f6d2 100644
--- a/src/plugins/platforms/xcb/qxcbcursor.h
+++ b/src/plugins/platforms/xcb/qxcbcursor.h
@@ -76,10 +76,10 @@ public:
QXcbCursor(QXcbConnection *conn, QXcbScreen *screen);
~QXcbCursor();
#ifndef QT_NO_CURSOR
- void changeCursor(QCursor *cursor, QWindow *widget) Q_DECL_OVERRIDE;
+ void changeCursor(QCursor *cursor, QWindow *widget) override;
#endif
- QPoint pos() const Q_DECL_OVERRIDE;
- void setPos(const QPoint &pos) Q_DECL_OVERRIDE;
+ QPoint pos() const override;
+ void setPos(const QPoint &pos) override;
static void queryPointer(QXcbConnection *c, QXcbVirtualDesktop **virtualDesktop, QPoint *pos, int *keybMask = 0);
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index 4915bb1b11..494cecb3d1 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -130,9 +130,9 @@ public:
~QXcbDropData();
protected:
- bool hasFormat_sys(const QString &mimeType) const Q_DECL_OVERRIDE;
- QStringList formats_sys() const Q_DECL_OVERRIDE;
- QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
+ bool hasFormat_sys(const QString &mimeType) const override;
+ QStringList formats_sys() const override;
+ QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override;
QVariant xdndObtainData(const QByteArray &format, QVariant::Type requestedType) const;
diff --git a/src/plugins/platforms/xcb/qxcbdrag.h b/src/plugins/platforms/xcb/qxcbdrag.h
index cb6e95cc9a..2d152edf76 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.h
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
@@ -74,14 +74,14 @@ public:
QXcbDrag(QXcbConnection *c);
~QXcbDrag();
- virtual QMimeData *platformDropData() Q_DECL_OVERRIDE;
- bool eventFilter(QObject *o, QEvent *e) Q_DECL_OVERRIDE;
+ QMimeData *platformDropData() override;
+ bool eventFilter(QObject *o, QEvent *e) override;
- void startDrag() Q_DECL_OVERRIDE;
- void cancel() Q_DECL_OVERRIDE;
- void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void endDrag() Q_DECL_OVERRIDE;
+ void startDrag() override;
+ void cancel() override;
+ void move(const QPoint &globalPos) override;
+ void drop(const QPoint &globalPos) override;
+ void endDrag() override;
void handleEnter(QPlatformWindow *window, const xcb_client_message_event_t *event, xcb_window_t proxy = 0);
void handlePosition(QPlatformWindow *w, const xcb_client_message_event_t *event);
@@ -93,13 +93,13 @@ public:
void handleFinished(const xcb_client_message_event_t *event);
bool dndEnable(QXcbWindow *win, bool on);
- bool ownsDragObject() const Q_DECL_OVERRIDE;
+ bool ownsDragObject() const override;
void updatePixmap();
xcb_timestamp_t targetTime() { return target_time; }
protected:
- void timerEvent(QTimerEvent* e) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent* e) override;
private:
friend class QXcbDropData;
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index f4da7ba033..af9ffab8ae 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -447,12 +447,8 @@ QByteArray QXcbIntegration::wmClass() const
className[0] = className.at(0).toUpper();
}
- if (!name.isEmpty() && !className.isEmpty()) {
- m_wmClass = name.toLocal8Bit();
- m_wmClass.append('\0');
- m_wmClass.append(className.toLocal8Bit());
- m_wmClass.append('\0');
- }
+ if (!name.isEmpty() && !className.isEmpty())
+ m_wmClass = name.toLocal8Bit() + '\0' + className.toLocal8Bit() + '\0';
}
return m_wmClass;
}
diff --git a/src/plugins/platforms/xcb/qxcbintegration.h b/src/plugins/platforms/xcb/qxcbintegration.h
index 34dd44d491..f8034f436f 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.h
+++ b/src/plugins/platforms/xcb/qxcbintegration.h
@@ -60,57 +60,57 @@ public:
QXcbIntegration(const QStringList &parameters, int &argc, char **argv);
~QXcbIntegration();
- QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
+ QPlatformWindow *createPlatformWindow(QWindow *window) const override;
#ifndef QT_NO_OPENGL
- QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif
- QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
+ QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
- QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const Q_DECL_OVERRIDE;
+ QPlatformOffscreenSurface *createPlatformOffscreenSurface(QOffscreenSurface *surface) const override;
- bool hasCapability(Capability cap) const Q_DECL_OVERRIDE;
- QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
- void initialize() Q_DECL_OVERRIDE;
+ bool hasCapability(Capability cap) const override;
+ QAbstractEventDispatcher *createEventDispatcher() const override;
+ void initialize() override;
void moveToScreen(QWindow *window, int screen);
- QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
+ QPlatformFontDatabase *fontDatabase() const override;
- QPlatformNativeInterface *nativeInterface()const Q_DECL_OVERRIDE;
+ QPlatformNativeInterface *nativeInterface()const override;
#ifndef QT_NO_CLIPBOARD
- QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
+ QPlatformClipboard *clipboard() const override;
#endif
#ifndef QT_NO_DRAGANDDROP
- QPlatformDrag *drag() const Q_DECL_OVERRIDE;
+ QPlatformDrag *drag() const override;
#endif
- QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
+ QPlatformInputContext *inputContext() const override;
#ifndef QT_NO_ACCESSIBILITY
- QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
+ QPlatformAccessibility *accessibility() const override;
#endif
- QPlatformServices *services() const Q_DECL_OVERRIDE;
+ QPlatformServices *services() const override;
- Qt::KeyboardModifiers queryKeyboardModifiers() const Q_DECL_OVERRIDE;
- QList<int> possibleKeys(const QKeyEvent *e) const Q_DECL_OVERRIDE;
+ Qt::KeyboardModifiers queryKeyboardModifiers() const override;
+ QList<int> possibleKeys(const QKeyEvent *e) const override;
- QStringList themeNames() const Q_DECL_OVERRIDE;
- QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
- QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
+ QStringList themeNames() const override;
+ QPlatformTheme *createPlatformTheme(const QString &name) const override;
+ QVariant styleHint(StyleHint hint) const override;
QXcbConnection *defaultConnection() const { return m_connections.first(); }
QByteArray wmClass() const;
#if !defined(QT_NO_SESSIONMANAGER) && defined(XCB_USE_SM)
- QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const Q_DECL_OVERRIDE;
+ QPlatformSessionManager *createPlatformSessionManager(const QString &id, const QString &key) const override;
#endif
- void sync() Q_DECL_OVERRIDE;
+ void sync() override;
- void beep() const Q_DECL_OVERRIDE;
+ void beep() const override;
static QXcbIntegration *instance() { return m_instance; }
diff --git a/src/plugins/platforms/xcb/qxcbmain.cpp b/src/plugins/platforms/xcb/qxcbmain.cpp
index ab55bb7691..f8cb9a9269 100644
--- a/src/plugins/platforms/xcb/qxcbmain.cpp
+++ b/src/plugins/platforms/xcb/qxcbmain.cpp
@@ -47,7 +47,7 @@ class QXcbIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "xcb.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&, int &, char **) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&, int &, char **) override;
};
QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv)
diff --git a/src/plugins/platforms/xcb/qxcbnativeinterface.h b/src/plugins/platforms/xcb/qxcbnativeinterface.h
index acecbf4116..a830829311 100644
--- a/src/plugins/platforms/xcb/qxcbnativeinterface.h
+++ b/src/plugins/platforms/xcb/qxcbnativeinterface.h
@@ -78,22 +78,22 @@ public:
QXcbNativeInterface();
- void *nativeResourceForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
- void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context) Q_DECL_OVERRIDE;
- void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) Q_DECL_OVERRIDE;
- void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) Q_DECL_OVERRIDE;
- void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore) Q_DECL_OVERRIDE;
+ void *nativeResourceForIntegration(const QByteArray &resource) override;
+ void *nativeResourceForContext(const QByteArray &resourceString, QOpenGLContext *context) override;
+ void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
+ void *nativeResourceForWindow(const QByteArray &resourceString, QWindow *window) override;
+ void *nativeResourceForBackingStore(const QByteArray &resource, QBackingStore *backingStore) override;
#ifndef QT_NO_CURSOR
- void *nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor) Q_DECL_OVERRIDE;
+ void *nativeResourceForCursor(const QByteArray &resource, const QCursor &cursor) override;
#endif
- NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
- NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) Q_DECL_OVERRIDE;
- NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource) Q_DECL_OVERRIDE;
- NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) Q_DECL_OVERRIDE;
- NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource) Q_DECL_OVERRIDE;
+ NativeResourceForIntegrationFunction nativeResourceFunctionForIntegration(const QByteArray &resource) override;
+ NativeResourceForContextFunction nativeResourceFunctionForContext(const QByteArray &resource) override;
+ NativeResourceForScreenFunction nativeResourceFunctionForScreen(const QByteArray &resource) override;
+ NativeResourceForWindowFunction nativeResourceFunctionForWindow(const QByteArray &resource) override;
+ NativeResourceForBackingStoreFunction nativeResourceFunctionForBackingStore(const QByteArray &resource) override;
- QFunctionPointer platformFunction(const QByteArray &function) const Q_DECL_OVERRIDE;
+ QFunctionPointer platformFunction(const QByteArray &function) const override;
inline const QByteArray &genericEventFilterType() const { return m_genericEventFilterType; }
diff --git a/src/plugins/platforms/xcb/qxcbscreen.h b/src/plugins/platforms/xcb/qxcbscreen.h
index 0d32c3d624..627397fcaf 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.h
+++ b/src/plugins/platforms/xcb/qxcbscreen.h
@@ -115,24 +115,24 @@ public:
QString getOutputName(xcb_randr_get_output_info_reply_t *outputInfo);
- QPixmap grabWindow(WId window, int x, int y, int width, int height) const Q_DECL_OVERRIDE;
+ QPixmap grabWindow(WId window, int x, int y, int width, int height) const override;
- QWindow *topLevelAt(const QPoint &point) const Q_DECL_OVERRIDE;
+ QWindow *topLevelAt(const QPoint &point) const override;
- QRect geometry() const Q_DECL_OVERRIDE { return m_geometry; }
- QRect availableGeometry() const Q_DECL_OVERRIDE {return m_availableGeometry;}
- int depth() const Q_DECL_OVERRIDE { return screen()->root_depth; }
- QImage::Format format() const Q_DECL_OVERRIDE;
- QSizeF physicalSize() const Q_DECL_OVERRIDE { return m_sizeMillimeters; }
+ QRect geometry() const override { return m_geometry; }
+ QRect availableGeometry() const override {return m_availableGeometry;}
+ int depth() const override { return screen()->root_depth; }
+ QImage::Format format() const override;
+ QSizeF physicalSize() const override { return m_sizeMillimeters; }
QSize virtualSize() const { return m_virtualSize; }
QSizeF physicalVirtualSize() const { return m_virtualSizeMillimeters; }
QDpi virtualDpi() const;
- QDpi logicalDpi() const Q_DECL_OVERRIDE;
- qreal pixelDensity() const Q_DECL_OVERRIDE;
- QPlatformCursor *cursor() const Q_DECL_OVERRIDE;
- qreal refreshRate() const Q_DECL_OVERRIDE { return m_refreshRate; }
- Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE { return m_orientation; }
- QList<QPlatformScreen *> virtualSiblings() const Q_DECL_OVERRIDE { return m_virtualDesktop->screens(); }
+ QDpi logicalDpi() const override;
+ qreal pixelDensity() const override;
+ QPlatformCursor *cursor() const override;
+ qreal refreshRate() const override { return m_refreshRate; }
+ Qt::ScreenOrientation orientation() const override { return m_orientation; }
+ QList<QPlatformScreen *> virtualSiblings() const override { return m_virtualDesktop->screens(); }
QXcbVirtualDesktop *virtualDesktop() const { return m_virtualDesktop; }
void setPrimary(bool primary) { m_primary = primary; }
@@ -161,7 +161,7 @@ public:
const xcb_visualtype_t *visualForId(xcb_visualid_t) const;
quint8 depthOfVisual(xcb_visualid_t) const;
- QString name() const Q_DECL_OVERRIDE { return m_outputName; }
+ QString name() const override { return m_outputName; }
void handleScreenChange(xcb_randr_screen_change_notify_event_t *change_event);
void updateGeometry(const QRect &geom, uint8_t rotation);
diff --git a/src/plugins/platforms/xcb/qxcbsessionmanager.h b/src/plugins/platforms/xcb/qxcbsessionmanager.h
index a184282034..0ad9445361 100644
--- a/src/plugins/platforms/xcb/qxcbsessionmanager.h
+++ b/src/plugins/platforms/xcb/qxcbsessionmanager.h
@@ -69,17 +69,17 @@ public:
void setSessionId(const QString &id) { m_sessionId = id; }
void setSessionKey(const QString &key) { m_sessionKey = key; }
- bool allowsInteraction() Q_DECL_OVERRIDE;
- bool allowsErrorInteraction() Q_DECL_OVERRIDE;
- void release() Q_DECL_OVERRIDE;
+ bool allowsInteraction() override;
+ bool allowsErrorInteraction() override;
+ void release() override;
- void cancel() Q_DECL_OVERRIDE;
+ void cancel() override;
- void setManagerProperty(const QString &name, const QString &value) Q_DECL_OVERRIDE;
- void setManagerProperty(const QString &name, const QStringList &value) Q_DECL_OVERRIDE;
+ void setManagerProperty(const QString &name, const QString &value) override;
+ void setManagerProperty(const QString &name, const QStringList &value) override;
- bool isPhase2() const Q_DECL_OVERRIDE;
- void requestPhase2() Q_DECL_OVERRIDE;
+ bool isPhase2() const override;
+ void requestPhase2() override;
void exitEventLoop();
diff --git a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
index 5cca4782aa..a6131e6d0e 100644
--- a/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
+++ b/src/plugins/platforms/xcb/qxcbsystemtraytracker.h
@@ -61,7 +61,7 @@ public:
void notifyManagerClientMessageEvent(const xcb_client_message_event_t *);
- void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) Q_DECL_OVERRIDE;
+ void handleDestroyNotifyEvent(const xcb_destroy_notify_event_t *) override;
bool visualHasAlphaChannel();
signals:
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 0c8e78491e..5fa8541f26 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -2738,13 +2738,23 @@ bool QXcbWindow::startSystemResize(const QPoint &pos, Qt::Corner corner)
const xcb_atom_t moveResize = connection()->atom(QXcbAtom::_NET_WM_MOVERESIZE);
if (!connection()->wmSupport()->isSupportedByWM(moveResize))
return false;
+ const QPoint globalPos = window()->mapToGlobal(pos);
+#ifdef XCB_USE_XINPUT22
+ if (connection()->startSystemResizeForTouchBegin(m_window, globalPos, corner))
+ return true;
+#endif
+ return doStartSystemResize(globalPos, corner);
+}
+
+bool QXcbWindow::doStartSystemResize(const QPoint &globalPos, Qt::Corner corner)
+{
+ const xcb_atom_t moveResize = connection()->atom(QXcbAtom::_NET_WM_MOVERESIZE);
xcb_client_message_event_t xev;
xev.response_type = XCB_CLIENT_MESSAGE;
xev.type = moveResize;
xev.sequence = 0;
xev.window = xcb_window();
xev.format = 32;
- const QPoint globalPos = window()->mapToGlobal(pos);
xev.data.data32[0] = globalPos.x();
xev.data.data32[1] = globalPos.y();
const bool bottom = corner == Qt::BottomRightCorner || corner == Qt::BottomLeftCorner;
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index 92f3f7a67c..089df8f3f6 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -76,75 +76,75 @@ public:
QXcbWindow(QWindow *window);
~QXcbWindow();
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) override;
- QMargins frameMargins() const Q_DECL_OVERRIDE;
+ QMargins frameMargins() const override;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
- void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
- WId winId() const Q_DECL_OVERRIDE;
- void setParent(const QPlatformWindow *window) Q_DECL_OVERRIDE;
+ void setVisible(bool visible) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
+ void setWindowState(Qt::WindowState state) override;
+ WId winId() const override;
+ void setParent(const QPlatformWindow *window) override;
- bool isExposed() const Q_DECL_OVERRIDE;
- bool isEmbedded(const QPlatformWindow *parentWindow = 0) const Q_DECL_OVERRIDE;
- QPoint mapToGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
- QPoint mapFromGlobal(const QPoint &pos) const Q_DECL_OVERRIDE;
+ bool isExposed() const override;
+ bool isEmbedded(const QPlatformWindow *parentWindow = 0) const override;
+ QPoint mapToGlobal(const QPoint &pos) const override;
+ QPoint mapFromGlobal(const QPoint &pos) const override;
- void setWindowTitle(const QString &title) Q_DECL_OVERRIDE;
+ void setWindowTitle(const QString &title) override;
void setWindowIconText(const QString &title);
- void setWindowIcon(const QIcon &icon) Q_DECL_OVERRIDE;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
- void propagateSizeHints() Q_DECL_OVERRIDE;
+ void setWindowIcon(const QIcon &icon) override;
+ void raise() override;
+ void lower() override;
+ void propagateSizeHints() override;
- void requestActivateWindow() Q_DECL_OVERRIDE;
+ void requestActivateWindow() override;
- bool setKeyboardGrabEnabled(bool grab) Q_DECL_OVERRIDE;
- bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE;
+ bool setKeyboardGrabEnabled(bool grab) override;
+ bool setMouseGrabEnabled(bool grab) override;
void setCursor(xcb_cursor_t cursor, bool isBitmapCursor);
- QSurfaceFormat format() const Q_DECL_OVERRIDE;
+ QSurfaceFormat format() const override;
- void windowEvent(QEvent *event) Q_DECL_OVERRIDE;
+ void windowEvent(QEvent *event) override;
- bool startSystemResize(const QPoint &pos, Qt::Corner corner) Q_DECL_OVERRIDE;
+ bool startSystemResize(const QPoint &pos, Qt::Corner corner) override;
- void setOpacity(qreal level) Q_DECL_OVERRIDE;
- void setMask(const QRegion &region) Q_DECL_OVERRIDE;
+ void setOpacity(qreal level) override;
+ void setMask(const QRegion &region) override;
- void setAlertState(bool enabled) Q_DECL_OVERRIDE;
- bool isAlertState() const Q_DECL_OVERRIDE { return m_alertState; }
+ void setAlertState(bool enabled) override;
+ bool isAlertState() const override { return m_alertState; }
xcb_window_t xcb_window() const { return m_window; }
uint depth() const { return m_depth; }
QImage::Format imageFormat() const { return m_imageFormat; }
bool imageNeedsRgbSwap() const { return m_imageRgbSwap; }
- bool handleGenericEvent(xcb_generic_event_t *event, long *result) Q_DECL_OVERRIDE;
-
- void handleExposeEvent(const xcb_expose_event_t *event) Q_DECL_OVERRIDE;
- void handleClientMessageEvent(const xcb_client_message_event_t *event) Q_DECL_OVERRIDE;
- void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event) Q_DECL_OVERRIDE;
- void handleMapNotifyEvent(const xcb_map_notify_event_t *event) Q_DECL_OVERRIDE;
- void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event) Q_DECL_OVERRIDE;
- void handleButtonPressEvent(const xcb_button_press_event_t *event) Q_DECL_OVERRIDE;
- void handleButtonReleaseEvent(const xcb_button_release_event_t *event) Q_DECL_OVERRIDE;
- void handleMotionNotifyEvent(const xcb_motion_notify_event_t *event) Q_DECL_OVERRIDE;
-
- void handleEnterNotifyEvent(const xcb_enter_notify_event_t *event) Q_DECL_OVERRIDE;
- void handleLeaveNotifyEvent(const xcb_leave_notify_event_t *event) Q_DECL_OVERRIDE;
- void handleFocusInEvent(const xcb_focus_in_event_t *event) Q_DECL_OVERRIDE;
- void handleFocusOutEvent(const xcb_focus_out_event_t *event) Q_DECL_OVERRIDE;
- void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE;
+ bool handleGenericEvent(xcb_generic_event_t *event, long *result) override;
+
+ void handleExposeEvent(const xcb_expose_event_t *event) override;
+ void handleClientMessageEvent(const xcb_client_message_event_t *event) override;
+ void handleConfigureNotifyEvent(const xcb_configure_notify_event_t *event) override;
+ void handleMapNotifyEvent(const xcb_map_notify_event_t *event) override;
+ void handleUnmapNotifyEvent(const xcb_unmap_notify_event_t *event) override;
+ void handleButtonPressEvent(const xcb_button_press_event_t *event) override;
+ void handleButtonReleaseEvent(const xcb_button_release_event_t *event) override;
+ void handleMotionNotifyEvent(const xcb_motion_notify_event_t *event) override;
+
+ void handleEnterNotifyEvent(const xcb_enter_notify_event_t *event) override;
+ void handleLeaveNotifyEvent(const xcb_leave_notify_event_t *event) override;
+ void handleFocusInEvent(const xcb_focus_in_event_t *event) override;
+ void handleFocusOutEvent(const xcb_focus_out_event_t *event) override;
+ void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override;
#ifdef XCB_USE_XINPUT22
void handleXIMouseButtonState(const xcb_ge_event_t *);
- void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) Q_DECL_OVERRIDE;
- void handleXIEnterLeave(xcb_ge_event_t *) Q_DECL_OVERRIDE;
+ void handleXIMouseEvent(xcb_ge_event_t *, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized) override;
+ void handleXIEnterLeave(xcb_ge_event_t *) override;
#endif
- QXcbWindow *toWindow() Q_DECL_OVERRIDE;
+ QXcbWindow *toWindow() override;
void handleMouseEvent(xcb_timestamp_t time, const QPoint &local, const QPoint &global,
Qt::KeyboardModifiers modifiers, Qt::MouseEventSource source);
@@ -178,6 +178,8 @@ public:
QXcbScreen *xcbScreen() const;
+ bool doStartSystemResize(const QPoint &globalPos, Qt::Corner corner);
+
virtual void create();
virtual void destroy();
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.h b/src/plugins/platforms/xcb/qxcbxsettings.h
index ff1932734a..ab1f784274 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.h
+++ b/src/plugins/platforms/xcb/qxcbxsettings.h
@@ -61,7 +61,7 @@ public:
void removeCallbackForHandle(const QByteArray &property, void *handle);
void removeCallbackForHandle(void *handle);
- void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) Q_DECL_OVERRIDE;
+ void handlePropertyNotifyEvent(const xcb_property_notify_event_t *event) override;
private:
QXcbXSettingsPrivate *d_ptr;
};