From 1d282a727e4b9e58480bf8c2df9523bb61393ab5 Mon Sep 17 00:00:00 2001
From: Ruben Rodriguez <ruben@trisquel.info>
Date: Sun, 25 Dec 2022 13:44:13 -0500
Subject: [PATCH] mate-tweak: use marco-xpresent on intel gpus

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

diff --git a/helpers/make-mate-tweak b/helpers/make-mate-tweak
index 3f38e9bdb..f0ad032ca 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=13
+VERSION=14
 
 . ./config
 
@@ -53,12 +53,15 @@ WINDOW_MANAGER=xterm
 [ -f /usr/bin/marco ] && WINDOW_MANAGER=marco
 [ -f /usr/bin/marco-no-composite ] && WINDOW_MANAGER=marco-no-composite
 
+# Check for hardware acceleration
 if glxinfo -B | grep "OpenGL renderer string" | grep -qv llvmpipe ; then
+  WINDOW_MANAGER=marco
+  # Use marco-glx (picom) on non-intel gpu, if available
+  if glxinfo -B | grep -qiv vendor.*intel; then
     if [ -f /usr/bin/picom ] && [ -f /usr/bin/marco-glx ] ; then
-        WINDOW_MANAGER=marco-glx
-    else
-        WINDOW_MANAGER=marco
+            WINDOW_MANAGER=marco-glx
     fi
+  fi
 fi
 
 gsettings set org.mate.session.required-components windowmanager \$WINDOW_MANAGER
-- 
GitLab