fix: keep the unsupported-flag warning off browsers
--enable-blink-features is on the list of flags Chromium warns about, so every browser the flag was applied to put a yellow "unsupported command-line flag" bar above each page. Browsers are given --enable-features=MiddleClickAutoscroll instead. It asks for the same thing - Blink generates a feature of the same name for each of its runtime flags - and is not on that list. That spelling only works from Chromium 124 onwards, so everything else keeps the flag that works everywhere: an application embedding an older Chromium, Steam's CEF among them, has no such bar to show anyway. Helium knows the feature under a name of its own and ignores the Chromium one, so browsers are asked for HeliumMiddleClickAutoscroll as well; autoscroll never worked there before. A name a browser does not know is ignored, which is what makes one list safe for all of them. An installation set up by an earlier version is taken back and written again once, because a file that is already marked as patched would otherwise be left alone with the old flag in it.
This commit is contained in:
1 parent
d8900ef80f
commit
fa624380b1
6 files changed
+173
-49
No files matched your search
+13
-2
@@ -66,6 +66,15 @@ mca_apply() {
|
||||
MCA_N_ON=0; MCA_N_OFF=0; MCA_N_UNKNOWN=0
|
||||
|
||||
mca_config_load
|
||||
|
||||
# An installation that was set up by a version whose answer was a different
|
||||
# flag still has that flag where it put it, and nothing below would touch it
|
||||
# again: a file that is already marked as patched is left alone. Taking
|
||||
# everything back once, here, is what carries such an installation over.
|
||||
if [[ "$(mca_state_read flag_scheme 1)" != "$MCA_FLAG_SCHEME" ]]; then
|
||||
mca_revert_all
|
||||
fi
|
||||
|
||||
mca_scan
|
||||
|
||||
for i in "${!MCA_IDS[@]}"; do
|
||||
@@ -87,10 +96,11 @@ mca_apply() {
|
||||
|
||||
case "$route" in
|
||||
flags)
|
||||
mca_flags_apply "$prog" || mca_desktop_apply "$id" "$file"
|
||||
mca_flags_apply "$prog" "$kind" \
|
||||
|| mca_desktop_apply "$id" "$file" "$(mca_flags "$kind")"
|
||||
;;
|
||||
desktop)
|
||||
mca_desktop_apply "$id" "$file"
|
||||
mca_desktop_apply "$id" "$file" "$(mca_flags "$kind")"
|
||||
;;
|
||||
steam)
|
||||
mca_steam_desktop_apply "$id" "$file" "$packaging"
|
||||
@@ -143,6 +153,7 @@ mca_apply() {
|
||||
fi
|
||||
|
||||
mca_state_write last_apply "$(date +%s)"
|
||||
mca_state_write flag_scheme "$MCA_FLAG_SCHEME"
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user