[arch-commits] Commit in deepin-qt5platform-plugins/trunk (PKGBUILD deepin-only.patch)

Balló György bgyorgy at archlinux.org
Thu May 13 06:42:15 UTC 2021


    Date: Thursday, May 13, 2021 @ 06:42:14
  Author: bgyorgy
Revision: 932914

upgpkg: deepin-qt5platform-plugins 5.0.23-2: Only enable dxcb in dde

Added:
  deepin-qt5platform-plugins/trunk/deepin-only.patch
Modified:
  deepin-qt5platform-plugins/trunk/PKGBUILD

-------------------+
 PKGBUILD          |   15 +++++++++------
 deepin-only.patch |   46 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+), 6 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-13 06:34:40 UTC (rev 932913)
+++ PKGBUILD	2021-05-13 06:42:14 UTC (rev 932914)
@@ -2,23 +2,23 @@
 
 pkgname=deepin-qt5platform-plugins
 pkgver=5.0.23
-pkgrel=1
+pkgrel=2
 pkgdesc='Qt platform plugins for DDE'
 arch=('x86_64')
 url="https://github.com/linuxdeepin/qt5platform-plugins"
 license=('GPL3')
 provides=('deepin-qt5dxcb-plugin')
-# FIXME: this platform plugin makes vokoscreen to crash
-# https://github.com/linuxdeepin/qt5platform-plugins/issues/54
-conflicts=('deepin-qt5dxcb-plugin' 'vokoscreen')
+conflicts=('deepin-qt5dxcb-plugin')
 replaces=('deepin-qt5dxcb-plugin')
 depends=('cairo' 'kwayland' 'qt5-wayland' 'qt5-x11extras')
 makedepends=('expac' 'qt5-xcb-private-headers' 'libglvnd' 'libxcb')
 groups=('deepin')
 source=("$pkgname-$pkgver.tar.gz::https://github.com/linuxdeepin/qt5platform-plugins/archive/$pkgver.tar.gz"
-        'fix-crasher.patch')
+        'fix-crasher.patch'
+        'deepin-only.patch')
 sha512sums=('0efc4294829d39f599c26f9ab6cfa9da93ede9723b7238a1dde0b30b0ed79bbe5c17b8ab35f9fd5e87dcd3ccfb17e245b4aa0f1f67e6aea424f58061bd833aeb'
-            'fb49ed1bff09b21e6f42f550002fef5dbff7c9913a6ebd839441eba5fa708d7a60d850c4608637f3edb9a7d428778facd7d065c313c9f29988a34338df9151ee')
+            'fb49ed1bff09b21e6f42f550002fef5dbff7c9913a6ebd839441eba5fa708d7a60d850c4608637f3edb9a7d428778facd7d065c313c9f29988a34338df9151ee'
+            'f36b079226bdd2917fa91c91d577eb03e43b7c20526079afb95304019d91d3a254e1b6cff60e86749a31eac56cf676c0f0b989a8aa16ab48bb272c948a3afcb9')
 
 prepare() {
   cd qt5platform-plugins-$pkgver
@@ -26,6 +26,9 @@
   # Upstream fix for the crashes in krita and rapid-photo-downloader
   patch -Np1 -i ../fix-crasher.patch
 
+  # Upstream change to only enable dxcb in dde
+  patch -Np1 -i ../deepin-only.patch
+
   rm -r xcb/libqt5xcbqpa-dev wayland/qtwayland-dev
   # Disable wayland for now: https://github.com/linuxdeepin/qt5platform-plugins/issues/47
   sed -i '/wayland/d' qt5platform-plugins.pro

Added: deepin-only.patch
===================================================================
--- deepin-only.patch	                        (rev 0)
+++ deepin-only.patch	2021-05-13 06:42:14 UTC (rev 932914)
@@ -0,0 +1,46 @@
+From b41d5c11f626c00bafc226db4d5a72b30cad01d4 Mon Sep 17 00:00:00 2001
+From: justforlxz <justforlxz at gmail.com>
+Date: Thu, 18 Mar 2021 12:43:50 +0800
+Subject: [PATCH] refactor: Only enable dxcb in dde
+
+The default use of dxcb may affect other programs
+
+Issue: Fixes https://github.com/linuxdeepin/qt5integration/issues/41
+Issue: Fixes https://github.com/keepassxreboot/keepassxc/issues/6277
+Log:
+Change-Id: I465e98128c8374b43197377f10a299601d3618b4
+---
+ xcb/main.cpp | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/xcb/main.cpp b/xcb/main.cpp
+index ee8ded4..ceb5fd4 100644
+--- a/xcb/main.cpp
++++ b/xcb/main.cpp
+@@ -36,16 +36,21 @@ class DPlatformIntegrationPlugin : public QPlatformIntegrationPlugin
+ QPlatformIntegration* DPlatformIntegrationPlugin::create(const QString& system, const QStringList& parameters, int &argc, char **argv)
+ {
+ #ifdef Q_OS_LINUX
++    bool loadDXcb = false;
++
+     if (qEnvironmentVariableIsSet("D_DXCB_DISABLE")) {
+-        return new DPlatformIntegrationParent(parameters, argc, argv);
++        loadDXcb = false;
++    } else if (system == "dxcb") {
++        loadDXcb = true;
++    } else if (QString(qgetenv("XDG_CURRENT_DESKTOP")).toLower().startsWith("deepin")) {
++        loadDXcb = true;
+     }
+ 
+-    if (system == "dxcb" || system == "xcb") {
+-        return new DPlatformIntegration(parameters, argc, argv);
+-    }
++    return loadDXcb ? new DPlatformIntegration(parameters, argc, argv)
++                    : new DPlatformIntegrationParent(parameters, argc, argv);
+ #endif
+ 
+-    return 0;
++    return nullptr;
+ }
+ 
+ QT_END_NAMESPACE



More information about the arch-commits mailing list