[arch-commits] Commit in deepin-qt5dxcb-plugin/trunk (PKGBUILD qt-5.11.patch)

Felix Yan felixonmars at archlinux.org
Tue May 22 12:35:05 UTC 2018


    Date: Tuesday, May 22, 2018 @ 12:35:04
  Author: felixonmars
Revision: 327577

upgpkg: deepin-qt5dxcb-plugin 1.1.8.6-2

rebuild for qt 5.11

Added:
  deepin-qt5dxcb-plugin/trunk/qt-5.11.patch
Modified:
  deepin-qt5dxcb-plugin/trunk/PKGBUILD

---------------+
 PKGBUILD      |    9 ++++++---
 qt-5.11.patch |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-05-22 12:27:35 UTC (rev 327576)
+++ PKGBUILD	2018-05-22 12:35:04 UTC (rev 327577)
@@ -3,7 +3,7 @@
 
 pkgname=deepin-qt5dxcb-plugin
 pkgver=1.1.8.6
-pkgrel=1
+pkgrel=2
 pkgdesc='Qt platform plugins for DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/qt5dxcb-plugin"
@@ -11,11 +11,14 @@
 depends=('cairo' 'qt5-x11extras')
 makedepends=('qt5-xcb-private-headers')
 groups=('deepin')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz")
-sha512sums=('c8fd99d299e4867a69c4c846ea444861a5bdf8c711d7d9015ec8626f3cd2d3471b7cf78c60aa22a93d318bf82bc42598ca59f784cc29793b70c9f49ec5c7a0b2')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5dxcb-plugin/archive/$pkgver.tar.gz"
+        qt-5.11.patch)
+sha512sums=('c8fd99d299e4867a69c4c846ea444861a5bdf8c711d7d9015ec8626f3cd2d3471b7cf78c60aa22a93d318bf82bc42598ca59f784cc29793b70c9f49ec5c7a0b2'
+            'e076c590a15f43df729eb28d92c510d80ffbdd312b769179b53ca0b364d9b8232d0f14927b11a6626bcd14bea952d07a24505fb82bd0867174a76f9c937a2c32')
 
 prepare() {
   cd qt5dxcb-plugin-$pkgver
+  patch -p1 -i ../qt-5.11.patch
 
   rm -r platformplugin/libqt5xcbqpa-dev
   sed -i 's|error(Not support Qt Version: .*)|INCLUDEPATH += /usr/include/qtxcb-private|' platformplugin/linux.pri

Added: qt-5.11.patch
===================================================================
--- qt-5.11.patch	                        (rev 0)
+++ qt-5.11.patch	2018-05-22 12:35:04 UTC (rev 327577)
@@ -0,0 +1,49 @@
+diff --git a/platformplugin/dplatformintegration.cpp b/platformplugin/dplatformintegration.cpp
+index 4785057..cbb470e 100644
+--- a/platformplugin/dplatformintegration.cpp
++++ b/platformplugin/dplatformintegration.cpp
+@@ -583,8 +583,11 @@ static void overrideChangeCursor(QPlatformCursor *cursorHandle, QCursor * cursor
+         c = it.value();
+ #if QT_VERSION < QT_VERSION_CHECK(5, 7, 1)
+         w->setCursor(c);
+-#else
++#elif QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
+         w->setCursor(c, false);
++#else
++        xcb_change_window_attributes(DPlatformIntegration::xcbConnection()->xcb_connection(), w->xcb_window(), XCB_CW_CURSOR, &c);
++        xcb_flush(DPlatformIntegration::xcbConnection()->xcb_connection());
+ #endif
+     }
+ 
+diff --git a/platformplugin/windoweventhook.cpp b/platformplugin/windoweventhook.cpp
+index 2855ba0..ccf887a 100644
+--- a/platformplugin/windoweventhook.cpp
++++ b/platformplugin/windoweventhook.cpp
+@@ -431,6 +431,7 @@ void WindowEventHook::handleXIEnterLeave(xcb_ge_event_t *event)
+                 const int root_x = fixed1616ToInt(ev->root_x);
+                 const int root_y = fixed1616ToInt(ev->root_y);
+ 
++#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
+                 if (buttons.testFlag(b)) {
+                     if (!isSet) {
+                         QGuiApplicationPrivate::lastCursorPosition = DHighDpi::fromNativePixels(QPointF(root_x, root_y), me->window());
+@@ -442,6 +443,19 @@ void WindowEventHook::handleXIEnterLeave(xcb_ge_event_t *event)
+                     me->handleButtonPressEvent(event_x, event_y, root_x, root_y,
+                                                0, modifiers, ev->time);
+                 }
++#else
++                if (buttons.testFlag(b)) {
++                    if (!isSet) {
++                        QGuiApplicationPrivate::lastCursorPosition = DHighDpi::fromNativePixels(QPointF(root_x, root_y), me->window());
++                        me->handleButtonReleaseEvent(event_x, event_y, root_x, root_y,
++                                                     0, modifiers, ev->time, QEvent::MouseButtonRelease);
++                    }
++                } else if (isSet) {
++                    QGuiApplicationPrivate::lastCursorPosition = DHighDpi::fromNativePixels(QPointF(root_x, root_y), me->window());
++                    me->handleButtonPressEvent(event_x, event_y, root_x, root_y,
++                                               0, modifiers, ev->time, QEvent::MouseButtonRelease);
++                }
++#endif
+             }
+         }
+     }



More information about the arch-commits mailing list