diff options
author | Shawn Rutledge <shawn.rutledge@digia.com> | 2013-04-12 16:57:04 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 14:30:50 +0200 |
commit | dd7058898c423617c6d7f6d5c576e23eee0fe773 (patch) | |
tree | 3561b54506f4db12d94a8f2d12011fed74e96f7e /src/plugins/platforms/xcb/qxcbintegration.cpp | |
parent | df93d356df528a4449be3caa72dfc58fc91132dd (diff) |
xcb: don't do mouse synthesis from touch unless we find a reason
One reason is when we are using XInput 2.2, because touch devices
will then generate touch events only. For the other X11 scenarios,
X11 does its own mouse emulation.
QPlatformIntegration::styleHint() wasn't overridden yet. The remaining
hints are TODO for now.
Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index dd1466d23c..de26353e1b 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -337,4 +337,30 @@ QPlatformTheme *QXcbIntegration::createPlatformTheme(const QString &name) const return QGenericUnixTheme::createUnixTheme(name); } +QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const +{ + switch (hint) { + case QPlatformIntegration::CursorFlashTime: + case QPlatformIntegration::KeyboardInputInterval: + case QPlatformIntegration::MouseDoubleClickInterval: + case QPlatformIntegration::StartDragDistance: + case QPlatformIntegration::StartDragTime: + case QPlatformIntegration::KeyboardAutoRepeatRate: + case QPlatformIntegration::PasswordMaskDelay: + case QPlatformIntegration::FontSmoothingGamma: + case QPlatformIntegration::StartDragVelocity: + case QPlatformIntegration::UseRtlExtensions: + // TODO using various xcb, gnome or KDE settings + break; // Not implemented, use defaults + case QPlatformIntegration::ShowIsFullScreen: + // X11 always has support for windows, but the + // window manager could prevent it (e.g. matchbox) + return false; + case QPlatformIntegration::SynthesizeMouseFromTouchEvents: + // We do not want Qt to synthesize mouse events if X11 already does it. + return m_connections.at(0)->hasTouchWithoutMouseEmulation(); + } + return QPlatformIntegration::styleHint(hint); +} + QT_END_NAMESPACE |