[arch-commits] Commit in qt5-base/kde-unstable (PKGBUILD qtbug-74578.patch)

Antonio Rojas arojas at archlinux.org
Wed Mar 20 13:59:24 UTC 2019


    Date: Wednesday, March 20, 2019 @ 13:59:23
  Author: arojas
Revision: 348760

Fix transparency

Added:
  qt5-base/kde-unstable/qtbug-74578.patch
Modified:
  qt5-base/kde-unstable/PKGBUILD

-------------------+
 PKGBUILD          |   10 +++++++---
 qtbug-74578.patch |   39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-03-20 13:40:45 UTC (rev 348759)
+++ PKGBUILD	2019-03-20 13:59:23 UTC (rev 348760)
@@ -5,7 +5,7 @@
 pkgname=(qt5-base qt5-xcb-private-headers)
 _qtver=5.13.0-beta1
 pkgver=${_qtver/-/}
-pkgrel=1
+pkgrel=2
 arch=('x86_64')
 url='https://www.qt.io'
 license=('GPL3' 'LGPL3' 'FDL' 'custom')
@@ -26,8 +26,10 @@
 conflicts=('qtchooser')
 groups=('qt' 'qt5')
 _pkgfqn="${pkgbase/5-/}-everywhere-src-${_qtver}"
-source=("https://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz")
-sha256sums=('2a25181ea33bab1e356311ee72ca3e748a72f958e864fe6a94fa965050a1b4f9')
+source=("https://download.qt.io/development_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
+        qtbug-74578.patch)
+sha256sums=('2a25181ea33bab1e356311ee72ca3e748a72f958e864fe6a94fa965050a1b4f9'
+            'bfb983991f7a321bb6ef539ae4f5cf23ac7bc1d7a8ae13bbe8f0899f34dd4128')
 
 prepare() {
   cd ${_pkgfqn}
@@ -38,6 +40,8 @@
     mkspecs/common/gcc-base.conf
   sed -i -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${LDFLAGS}|" \
     mkspecs/common/g++-unix.conf
+
+  patch -p1 -i ../qtbug-74578.patch # Fix transparency
 }
 
 build() {

Added: qtbug-74578.patch
===================================================================
--- qtbug-74578.patch	                        (rev 0)
+++ qtbug-74578.patch	2019-03-20 13:59:23 UTC (rev 348760)
@@ -0,0 +1,39 @@
+From 6897c999fdbc3b93c1bed422e10479346dbd7e7f Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen at qt.io>
+Date: Wed, 20 Mar 2019 14:30:54 +0100
+Subject: [PATCH] Handle when XVisuals lose the alpha channel of the FBConfig
+
+Sometimes the XVisual for an FBConfig have no alpha data, and thus
+won't work when an alpha channel is required.
+
+Fixes: QTBUG-74578
+Change-Id: Idf05cbfcaea5edf667035939e9bc5d5df2172eec
+---
+ src/platformsupport/glxconvenience/qglxconvenience.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/platformsupport/glxconvenience/qglxconvenience.cpp b/src/platformsupport/glxconvenience/qglxconvenience.cpp
+index 40521ef6da39..6458454336e9 100644
+--- a/src/platformsupport/glxconvenience/qglxconvenience.cpp
++++ b/src/platformsupport/glxconvenience/qglxconvenience.cpp
+@@ -223,6 +223,7 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
+                     continue;
+             }
+ 
++            QXlibPointer<XVisualInfo> visual(glXGetVisualFromFBConfig(display, candidate));
+             int actualRed;
+             int actualGreen;
+             int actualBlue;
+@@ -231,7 +232,8 @@ GLXFBConfig qglx_findConfig(Display *display, int screen , QSurfaceFormat format
+             glXGetFBConfigAttrib(display, candidate, GLX_GREEN_SIZE, &actualGreen);
+             glXGetFBConfigAttrib(display, candidate, GLX_BLUE_SIZE, &actualBlue);
+             glXGetFBConfigAttrib(display, candidate, GLX_ALPHA_SIZE, &actualAlpha);
+-
++            // Sometimes the visuals don't have a depth that includes the alpha channel.
++            actualAlpha = qMin(actualAlpha, visual->depth - actualRed - actualGreen - actualBlue);
+ 
+             if (requestedRed && actualRed < requestedRed)
+                 continue;
+-- 
+2.21.0
+



More information about the arch-commits mailing list