www-client/firefox-bin: don't enable XINPUT2 for KWin users
authorThomas Deutschmann <whissi@gentoo.org>
Thu, 2 Apr 2020 21:11:46 +0000 (23:11 +0200)
committerThomas Deutschmann <whissi@gentoo.org>
Thu, 2 Apr 2020 21:18:49 +0000 (23:18 +0200)
Bug: https://bugs.gentoo.org/715604
Package-Manager: Portage-2.3.96, Repoman-2.3.22
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
www-client/firefox-bin/files/firefox-bin.sh
www-client/firefox-bin/firefox-bin-68.6.0-r2.ebuild [moved from www-client/firefox-bin/firefox-bin-68.6.0-r1.ebuild with 100% similarity]
www-client/firefox-bin/firefox-bin-74.0-r2.ebuild [moved from www-client/firefox-bin/firefox-bin-74.0-r1.ebuild with 100% similarity]

index 15f95487feb4c6619431d22db76e1e9d97ebc340..baa6487a16662d8c9363b1e4c9669d1f6f2ed843 100644 (file)
@@ -83,7 +83,25 @@ fi
 ##
 ## Enable Xinput2 (#617344)
 ##
-export MOZ_USE_XINPUT2=1
+
+# respect user settings
+MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2:-auto}
+
+if [[ ${MOZ_USE_XINPUT2} == auto && -n ${WAYLAND_DISPLAY} ]]; then
+       # enabling XINPUT2 should be safe for all wayland users
+       MOZ_USE_XINPUT2=1
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == KDE ]]; then
+       # XINPUT2 is known to cause problems for KWin users
+       MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto && ${XDG_CURRENT_DESKTOP^^} == LXQT ]]; then
+       # LXQt uses KWin
+       MOZ_USE_XINPUT2=0
+elif [[ ${MOZ_USE_XINPUT2} == auto ]]; then
+       # should work on Mate, Xfce, FluxBox, OpenBox and all the others ...
+       MOZ_USE_XINPUT2=1
+fi
+
+[[ ${MOZ_USE_XINPUT2} != 0 ]] && export MOZ_USE_XINPUT2=${MOZ_USE_XINPUT2}
 
 # Don't throw "old profile" dialog box.
 export MOZ_ALLOW_DOWNGRADE=1