From b3bf2f2e8aeb5b2436a50282f59603df01949727 Mon Sep 17 00:00:00 2001
From: Ruben Rodriguez <ruben@trisquel.info>
Date: Sun, 4 Dec 2022 16:36:08 -0500
Subject: [PATCH] mate-tweak: improve test for 3D acceleration

---
 helpers/make-mate-tweak | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/helpers/make-mate-tweak b/helpers/make-mate-tweak
index fffd8b93..8a1346e5 100644
--- a/helpers/make-mate-tweak
+++ b/helpers/make-mate-tweak
@@ -18,7 +18,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-VERSION=11
+VERSION=12
 
 . ./config
 
@@ -51,8 +51,12 @@ WINDOW_MANAGER=xterm
 [ -f /usr/bin/marco ] && WINDOW_MANAGER=marco
 [ -f /usr/bin/marco-no-composite ] && WINDOW_MANAGER=marco-no-composite
 
-if glxinfo | grep -q Accelerated.*yes  && [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-xrender ] ; then
-    WINDOW_MANAGER=marco-xrender
+if glxinfo -B | grep "OpenGL renderer string" | grep -qv llvmpipe ; then
+    if [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-xrender ] ; then
+        WINDOW_MANAGER=marco-xrender
+    else
+        WINDOW_MANAGER=marco
+    fi
 fi
 
 gsettings set org.mate.session.required-components windowmanager \$WINDOW_MANAGER
-- 
GitLab