summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index af9ffab8ae..40858b39e0 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -214,6 +214,27 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
return xcbWindow;
}
+class QXcbForeignWindow : public QXcbWindow
+{
+public:
+ QXcbForeignWindow(QWindow *window, WId nativeHandle)
+ : QXcbWindow(window) { m_window = nativeHandle; }
+ ~QXcbForeignWindow() {}
+ bool isForeignWindow() const override { return true; }
+
+protected:
+ // No-ops
+ void create() override {}
+ void destroy() override {}
+};
+
+QPlatformWindow *QXcbIntegration::createForeignWindow(QWindow *window, WId nativeHandle) const
+{
+ QXcbWindow *xcbWindow = new QXcbForeignWindow(window, nativeHandle);
+ xcbWindow->create();
+ return xcbWindow;
+}
+
#ifndef QT_NO_OPENGL
QPlatformOpenGLContext *QXcbIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
{
@@ -384,9 +405,6 @@ QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
case QPlatformIntegration::PasswordMaskCharacter:
// TODO using various xcb, gnome or KDE settings
break; // Not implemented, use defaults
- case QPlatformIntegration::FontSmoothingGamma:
- // Match Qt 4.8 text rendering, and rendering of other X11 toolkits.
- return qreal(1.0);
case QPlatformIntegration::StartDragDistance: {
// The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but
// on a high-resolution screen it makes sense to increase it.