From 359546b069051213a7b337fefbe21b664618f959 Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Thu, 17 Sep 2015 10:21:32 -0700 Subject: evdevtouch: ensure touchpoints released with typeB mtdev drivers This happens in one particular case: when the touchpoint corresponding to the last slot is reported as released and a new point is reported as pressed right after, so that both events happens within a same sync. In this case, there will be two ABS_MT_TRACKING_ID events received, first with -1 to report the released touchpoint, then with a new id to report the pressed touchpoint, then the SYN_REPORT afterwards. This results in m_contacts[m_currentSlot].state being updated to Qt::TouchPointReleased then Qt::TouchPointPressed, with the former never being reported during the handling of SYN_REPORT. To handle this scenario we need to inspect m_lastContacts for a change in tracking id for a particular slot combined with a non-null state, indicating that slot has not yet been reported released and processed in the previous sync. (the state for processed released points is reset to zero at the end of the SYN_REPORT handler) Task-number: QTBUG-51563 Change-Id: I01493008cf9f267e758d974dab29556d0a1425ea Reviewed-by: Shawn Rutledge Reviewed-by: Laszlo Agocs Reviewed-by: Robin Burchell --- src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index ad348cc083..7cb4813c7b 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -531,9 +531,16 @@ void QEvdevTouchScreenData::processInputEvent(input_event *data) it.next(); Contact &contact(it.value()); int key = m_typeB ? it.key() : contact.trackingId; - if (!m_contacts.contains(key)) { - contact.state = Qt::TouchPointReleased; - addTouchPoint(contact, &combinedStates); + if (m_typeB) { + if (contact.trackingId != m_contacts[key].trackingId && contact.state) { + contact.state = Qt::TouchPointReleased; + addTouchPoint(contact, &combinedStates); + } + } else { + if (!m_contacts.contains(key)) { + contact.state = Qt::TouchPointReleased; + addTouchPoint(contact, &combinedStates); + } } } -- cgit v1.2.3 From 248488c894e5501c45a8c3bad215b9f9eca7475a Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 14 Dec 2015 00:51:38 +0400 Subject: QCoreTextFontDatabase: Get rid of local fallbacksForFamily cache The centralized one (in QFontDatabase) does the job. Change-Id: I33def7a7bcddeaa62b904d8812321a7f4648a9d0 Reviewed-by: Lars Knoll Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm index 0af779097c..e24f4aac8f 100644 --- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm +++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm @@ -518,9 +518,6 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo if (&CTFontCopyDefaultCascadeListForLanguages) #endif { - if (fallbackLists.contains(family)) - return fallbackLists.value(family); - QCFType attributes = CFDictionaryCreateMutable(kCFAllocatorDefault, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); CFDictionaryAddValue(attributes, kCTFontFamilyNameAttribute, QCFString(family)); if (QCFType fontDescriptor = CTFontDescriptorCreateWithAttributes(attributes)) { @@ -548,12 +545,9 @@ QStringList QCoreTextFontDatabase::fallbacksForFamily(const QString &family, QFo fallbackList.append(QStringLiteral("Arial Unicode MS")); #endif - fallbackLists[family] = fallbackList; + return fallbackList; } } - - if (fallbackLists.contains(family)) - return fallbackLists.value(family); } } #endif -- cgit v1.2.3 From 5655d061b2aa47f7c3268bf0b59c47c9c624cb58 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 10 Mar 2016 13:07:58 +0100 Subject: Xft antialias settings must not override requested NoAntialias If Xft enabled font antialiasing, QFont::NoAntialias would have no effect as it would be overridden. Change-Id: I4dae264bc6674ae81f181cc9ce85851174d42544 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/platformsupport') diff --git a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp index a5fe88871d..5305b8b970 100644 --- a/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp +++ b/src/platformsupport/fontdatabases/fontconfig/qfontconfigdatabase.cpp @@ -861,7 +861,7 @@ void QFontconfigDatabase::setupFontEngine(QFontEngineFT *engine, const QFontDef const QPlatformServices *services = QGuiApplicationPrivate::platformIntegration()->services(); bool useXftConf = (services && (services->desktopEnvironment() == "GNOME" || services->desktopEnvironment() == "UNITY")); - if (useXftConf) { + if (useXftConf && !forcedAntialiasSetting) { void *antialiasResource = QGuiApplication::platformNativeInterface()->nativeResourceForScreen("antialiasingEnabled", QGuiApplication::primaryScreen()); -- cgit v1.2.3