Description: Autogenerated patch header for a single-debian-patch file.
 The delta against upstream is either kept as a single patch, or maintained
 in some VCS, and exported as a single patch instead of more manageable
 atomic patches.
Forwarded: not-needed

---
--- icewm-3.7.4.orig/lib/keys.in
+++ icewm-3.7.4/lib/keys.in
@@ -26,8 +26,8 @@ key "Super+KP_Add"          amixer sset
 key "XF86AudioLowerVolume"  amixer sset Master 5%-
 key "XF86AudioRaiseVolume"  amixer sset Master 5%+
 key "XF86AudioMute"         amixer sset Master toggle
-key "XF86HomePage"          xdg-open about:blank
-key "XF86Search"            xdg-open https://www.google.com
+key "XF86HomePage"         sensible-browser about:blank
+key "XF86Search"            sensible-browser https://www.duckduckgo.com
 key "XF86Eject"             eject
 key "XF86Calculator"        /bin/sh -c "gnome-calculator || xcalc || ( type bc >/dev/null 2>&1 && @XTERMCMD@ -e bc -l)"
 
--- icewm-3.7.4.orig/lib/themes/CrystalBlue/default.theme
+++ icewm-3.7.4/lib/themes/CrystalBlue/default.theme
@@ -157,3 +157,6 @@ ClockFontNameXft=
 #Desktop
 DesktopBackgroundColor=                 "rgb:25/33/79"
 DesktopTransparencyColor=               "rgb:25/33/79"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/Helix/default.theme
+++ icewm-3.7.4/lib/themes/Helix/default.theme
@@ -50,3 +50,6 @@ ShowMenuButtonIcon=0
 
 
 
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/Infadel2/Ergonomic.theme
+++ icewm-3.7.4/lib/themes/Infadel2/Ergonomic.theme
@@ -128,3 +128,6 @@ ApmFontName		=	"-b&h-lucida-bold-r-norma
 
 ShowMenuButtonIcon=0
 TaskBarClockLeds=0
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/Infadel2/Overloaded.theme
+++ icewm-3.7.4/lib/themes/Infadel2/Overloaded.theme
@@ -128,3 +128,6 @@ ApmFontName		=	"-b&h-lucida-bold-r-norma
 
 ShowMenuButtonIcon=0
 TaskBarClockLeds=0
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/Infadel2/default.theme
+++ icewm-3.7.4/lib/themes/Infadel2/default.theme
@@ -124,3 +124,6 @@ ApmFontName		=	"-b&h-lucida-bold-r-norma
 
 ShowMenuButtonIcon=0
 TaskBarClockLeds=0
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/default/default.theme
+++ icewm-3.7.4/lib/themes/default/default.theme
@@ -49,4 +49,4 @@ ColorScrollBarButtonArrow="rgb:C0/C0/C0"
 DesktopBackgroundCenter=1
 DesktopBackgroundScaled=1
 #DesktopBackgroundColor="#3a6ea5"
-DesktopBackgroundImage="default.png"
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
--- icewm-3.7.4.orig/lib/themes/gtk2/default.theme
+++ icewm-3.7.4/lib/themes/gtk2/default.theme
@@ -39,3 +39,6 @@ ColorListBoxSelectionText="rgb:00/00/00"
 ColorScrollBar="rgb:C0/C0/C0"
 ColorScrollBarSlider="rgb:C0/C0/C0"
 ColorScrollBarButtonArrow="rgb:C0/C0/C0"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/icedesert/default.theme
+++ icewm-3.7.4/lib/themes/icedesert/default.theme
@@ -50,3 +50,6 @@ ColorApmText="rgb:ef/d0/97"
 ColorCPUStatusIdle="rgb:18/18/38"
 ColorNetIdle="rgb:18/18/38"
 ColorMEMStatusFree="rgb:18/18/38"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/metal2/default.theme
+++ icewm-3.7.4/lib/themes/metal2/default.theme
@@ -41,3 +41,6 @@ ColorScrollBar="rgb:CC/CC/CC"
 ColorScrollBarSlider="rgb:CC/CC/FF"
 ColorScrollBarButton="rgb:CC/CC/CC"
 ColorScrollBarButtonArrow="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/motif/default.theme
+++ icewm-3.7.4/lib/themes/motif/default.theme
@@ -24,3 +24,6 @@ ColorActiveTaskBarAppText="rgb:00/00/00"
 ColorScrollBar="rgb:C0/C0/C0"
 ColorScrollBarSlider="rgb:C0/C0/C0"
 ColorScrollBarButtonArrow="rgb:C0/C0/C0"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/nice/blue.theme
+++ icewm-3.7.4/lib/themes/nice/blue.theme
@@ -20,3 +20,6 @@ ColorNormalTaskBarApp="rgb:C0/C0/C0"
 ColorNormalTaskBarAppText="rgb:00/00/00"
 ColorActiveTaskBarApp="rgb:E0/E0/E0"
 ColorActiveTaskBarAppText="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/nice/default.theme
+++ icewm-3.7.4/lib/themes/nice/default.theme
@@ -23,3 +23,6 @@ ColorNormalTaskBarApp="rgb:C0/C0/C0"
 ColorNormalTaskBarAppText="rgb:00/00/00"
 ColorActiveTaskBarApp="rgb:E0/E0/E0"
 ColorActiveTaskBarAppText="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/nice2/default.theme
+++ icewm-3.7.4/lib/themes/nice2/default.theme
@@ -30,3 +30,6 @@ ColorActiveTaskBarAppText="rgb:00/00/00"
 ColorMinimizedTaskBarApp="rgb:00/80/C0"
 ColorMinimizedTaskBarAppText="rgb:00/00/00"
 ColorListBox="rgb:FF/FF/FF"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/warp3/default.theme
+++ icewm-3.7.4/lib/themes/warp3/default.theme
@@ -28,3 +28,6 @@ ColorNormalTaskBarApp="rgb:C0/C0/C0"
 ColorNormalTaskBarAppText="rgb:00/00/00"
 ColorActiveTaskBarApp="rgb:E0/E0/E0"
 ColorActiveTaskBarAppText="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/warp4/default.theme
+++ icewm-3.7.4/lib/themes/warp4/default.theme
@@ -24,3 +24,6 @@ ColorNormalTaskBarApp="rgb:C0/C0/C0"
 ColorNormalTaskBarAppText="rgb:00/00/00"
 ColorActiveTaskBarApp="rgb:E0/E0/E0"
 ColorActiveTaskBarAppText="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/win95/default.theme
+++ icewm-3.7.4/lib/themes/win95/default.theme
@@ -28,3 +28,6 @@ ColorScrollBar="rgb:E0/E0/E0"
 ColorScrollBarSlider="rgb:C0/C0/C0"
 ColorScrollBarButton="rgb:C0/C0/C0"
 ColorScrollBarButtonArrow="rgb:00/00/00"
+
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
+
--- icewm-3.7.4.orig/lib/themes/yellowmotif/default.theme
+++ icewm-3.7.4/lib/themes/yellowmotif/default.theme
@@ -13,7 +13,7 @@ CornerSizeY=22
 DlgBorderSizeX=2
 DlgBorderSizeY=2
 
-DesktopBackgroundImage=""
+DesktopBackgroundImage="/usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg"
 DesktopBackgroundColor="rgb:40/a0/c0"
 
 ColorNormalBorder="rgb:C0/C0/C0"
--- icewm-3.7.4.orig/lib/winoptions.in
+++ icewm-3.7.4/lib/winoptions.in
@@ -5,6 +5,8 @@
 
 xterm.XTerm.icon: xterm
 rxvt.icon: xterm
+urxvtc.icon: urxvt
+urxvt.icon: urxvt
 nxterm.icon: xterm
 emacs.Emacs.icon: emacs
 
--- icewm-3.7.4.orig/man/icewm-menu-fdo.pod
+++ icewm-3.7.4/man/icewm-menu-fdo.pod
@@ -91,6 +91,10 @@ calculated so far, therefore the timeout
 before the actual hard deadline by which the program should be
 terminated. The output may lack translations and icons.
 
+=item B<-l LANGUAGE>, B<--lang=LANGUAGE>
+
+Instead of the environment variable C<LANG> use LANGUAGE for the locale.
+
 =item B<-L MAX>, B<--limit-max-len=MAX>
 
 Cut the calculated program titles (after translation and adding
--- icewm-3.7.4.orig/src/debug.h
+++ icewm-3.7.4/src/debug.h
@@ -3,6 +3,7 @@
 
 #pragma GCC diagnostic ignored "-Wmissing-field-initializers"
 #pragma GCC diagnostic ignored "-Wunused-parameter"
+#pragma clang diagnostic ignored "-Wvla-cxx-extension"
 
 #ifdef DEBUG
 extern bool debug;
--- icewm-3.7.4.orig/src/default.h
+++ icewm-3.7.4/src/default.h
@@ -127,7 +127,7 @@ XIV(bool, win95keys,
 XIV(bool, autoReloadMenus,                      true)
 XIV(bool, arrangeWindowsOnScreenSizeChange,     true)
 XIV(bool, clientMouseActions,                   true)
-XIV(bool, showPrograms,                         false)
+XIV(bool, showPrograms,                         true)
 XIV(bool, showSettingsMenu,                     true)
 XIV(bool, showFocusModeMenu,                    true)
 XIV(bool, showThemesMenu,                       true)
@@ -180,7 +180,7 @@ XSV(const char *, mailBoxPath,
 XSV(const char *, mailCommand,                  TERM " -name mutt -e mutt")
 XSV(const char *, mailClassHint,                "mutt.XTerm")
 XSV(const char *, newMailCommand,               0)
-XSV(const char *, lockCommand,                  0)
+XSV(const char *, lockCommand,                  "xscreensaver-command -lock")
 XSV(const char *, clockCommand,                 "xclock -name icewm -title Clock")
 XSV(const char *, clockClassHint,               "icewm.XClock")
 XSV(const char *, runDlgCommand,                0)
@@ -189,10 +189,10 @@ XSV(const char *, terminalCommand,
 XSV(const char *, logoutCommand,                0)
 XSV(const char *, logoutCancelCommand,          0)
 #if __linux__
-XSV(const char *, shutdownCommand,              "test -e /run/systemd/system && systemctl poweroff || loginctl poweroff")
-XSV(const char *, rebootCommand,                "test -e /run/systemd/system && systemctl reboot || loginctl reboot")
-XSV(const char *, suspendCommand,               "test -e /run/systemd/system && systemctl suspend || loginctl suspend")
-XSV(const char *, hibernateCommand,             "test -e /run/systemd/system && systemctl hibernate || loginctl hibernate")
+XSV(const char *, shutdownCommand,              "test -e /run/systemd/system && systemctl poweroff || sudo -n /sbin/poweroff")
+XSV(const char *, rebootCommand,                "test -e /run/systemd/system && systemctl reboot || sudo -n /sbin/reboot")
+XSV(const char *, suspendCommand,               "test -e /run/systemd/system && systemctl suspend || sudo -n /usr/sbin/pm-suspend")
+XSV(const char *, hibernateCommand,             "test -e /run/systemd/system && systemctl hibernate || sudo -n /usr/sbin/pm-hibernate")
 #elif __OpenBSD__ || __NetBSD__ || __FreeBSD__
 XSV(const char *, shutdownCommand,              "shutdown -p now")
 XSV(const char *, rebootCommand,                "shutdown -r now")
@@ -208,18 +208,11 @@ XIV(int, taskBarCPUDelay,
 XIV(int, taskBarMEMDelay,                       500)
 XIV(int, taskBarNetSamples,                     20)
 XIV(int, taskBarNetDelay,                       500)
-XSV(const char *, cpuCommand,                   TERM " -name top -title Process\\ Status -e top")
+XSV(const char *, cpuCommand,                   TERM " -T 'Process Status' -e top")
 XSV(const char *, cpuClassHint,                 "top.XTerm")
 XIV(bool, cpuCombine,                           true)
-
-#if __linux__
-XSV(const char *, netCommand,                   TERM " -name 'ss' -title 'Socket Statistics' -hold -e sh -c 'which ss > /dev/null && watch -t ss -putswl || netstat -c'")
+XSV(const char *, netCommand,                   TERM " -T 'Network Status' -e /bin/sh /usr/share/icewm/netstat.sh")
 XSV(const char *, netClassHint,                 "ss.XTerm")
-#else
-XSV(const char *, netCommand,                   TERM " -name netstat -title 'Network Status' -hold -e netstat -c")
-XSV(const char *, netClassHint,                 "netstat.XTerm")
-#endif
-
 #if __OpenBSD__
 #define NET_DEVICES                             "[ew]* vio*"
 #else
--- icewm-3.7.4.orig/src/fdomenu.cc
+++ icewm-3.7.4/src/fdomenu.cc
@@ -217,15 +217,52 @@ const char *rtls[] = {
     "ur", // urdu
 };
 
-const char *getCheckedExplicitLocale(bool lctype) {
-    auto loc = setlocale(lctype ? LC_CTYPE : LC_MESSAGES, NULL);
-    if (loc == NULL)
-        return NULL;
-    return (islower(*loc & 0xff) && islower(loc[1] & 0xff) &&
-            !isalpha(loc[2] & 0xff))
-               ? loc
-               : NULL;
-}
+const char* getCheckedExplicitLocale() {
+    const char* loc = setlocale(LC_MESSAGES, nullptr);
+    if (loc) {
+        size_t pre = 0;
+        while (islower(loc[pre] & 0xff))
+            pre++;
+        if (pre < 2 || 3 < pre || isalpha(loc[pre] & 0xff))
+            loc = nullptr;
+    }
+    return Elvis(loc, "");
+}
+
+class Lang {
+public:
+    Lang(const char* loc) {
+        int i = 0;
+        while (islower(loc[i] & 0xff))
+            ++i;
+        if (2 <= i && i <= 3) {
+            lang.assign(loc, i);
+            if (loc[i] == '_') {
+                i++;
+                int t = i;
+                while (isalpha(loc[i] & 0xff))
+                    ++i;
+                terr.assign(loc + t, i - t);
+            }
+            while (loc[i] && loc[i] != '@')
+                ++i;
+            if (loc[i] == '@') {
+                i++;
+                int t = i;
+                while (isalpha(loc[i] & 0xff))
+                    ++i;
+                modi.assign(loc + t, i - t);
+            }
+        }
+    }
+    bool invalid() const {
+        return lang.empty();
+    }
+
+    string lang;
+    string terr;
+    string modi;
+};
 
 bool userFilter(const char *s, bool isSection) {
     if (match_in_section_only && !isSection)
@@ -256,7 +293,7 @@ class DesktopFile {
     string Icon, Categories;
     const string *comment = nullptr;
 
-    DesktopFile(string filePath, const string &langWanted);
+    DesktopFile(string filePath, const Lang& lang);
     DesktopFile(const string &_name, const string &_nameLoc,
                 const string &_icon)
         : Name(_name), NameLoc(_nameLoc), Icon(_icon) {}
@@ -278,7 +315,7 @@ class DesktopFile {
         return GenericNameLoc;
     }
 
-    static DesktopFilePtr load_visible(string &&path, const string &lang) {
+    static DesktopFilePtr load_visible(string &&path, const Lang& lang) {
         try {
             auto ret = new DesktopFile(path, lang);
             // matched conditions to hide the desktop entry?
@@ -335,7 +372,7 @@ const string &DesktopFile::GetCommand()
     return Exec;
 }
 
-DesktopFile::DesktopFile(string filePath, const string &langWanted) {
+DesktopFile::DesktopFile(string filePath, const Lang& lang) {
 
     std::ifstream dfile;
     dfile.open(filePath);
@@ -372,14 +409,25 @@ DesktopFile::DesktopFile(string filePath
             return;
         }
         // translation found but not looking for localized version here?
-        if (langWanted.size() < 2)
+        if (lang.invalid())
             return;
         l++;
-        // the exact match always overrides, the short is considered optional
-        if (0 == line.compare(l, langWanted.size(), langWanted))
-            outLoc = line.substr(v, e - v);
-        else if (outLoc.empty() && 0 == line.compare(l, 2, langWanted, 0, 2))
-            outLoc = line.substr(v, e - v);
+        auto r = line.find(']', l);
+        if (r != string::npos &&
+            line.compare(l, 2, lang.lang, 0, 2) == 0) {
+            string lstr = line.substr(l, r - l);
+            Lang cand(lstr.c_str());
+            if (cand.lang == lang.lang && cand.modi == lang.modi) {
+                if (cand.terr == lang.terr) {
+                    // an exact match
+                    outLoc = line.substr(v, e - v);
+                }
+                else if (outLoc.empty()) {
+                    // a backup match
+                    outLoc = line.substr(v, e - v);
+                }
+            }
+        }
     };
 
     while (dfile) {
@@ -970,16 +1018,10 @@ int main(int argc, char **argv) {
 
     std::ios_base::sync_with_stdio(false);
 
-    const char* msglang = nullptr;
+    const char* msglang = "";
 #ifdef CONFIG_I18N
     setlocale(LC_ALL, "");
-
-    msglang = getCheckedExplicitLocale(false);
-    right_to_left =
-        msglang && *msglang &&
-        std::any_of(rtls, rtls + ACOUNT(rtls), [&](const char *rtl) {
-            return rtl[0] == msglang[0] && rtl[1] == msglang[1];
-        });
+    msglang = getCheckedExplicitLocale();
     bindtextdomain(PACKAGE, LOCDIR);
     textdomain(PACKAGE);
 #endif
@@ -1015,9 +1057,10 @@ int main(int argc, char **argv) {
     string desktop_file_to_start;
 
     for (auto pArg = argv + 1; pArg < argv + argc; ++pArg) {
+        char *value = nullptr;
         if (is_version_switch(*pArg)) {
             cout << "icewm-menu-fdo " VERSION ", Copyright 2015-2024 Eduard "
-                    "Bloch, 2017-2023 Bert Gijsbers."
+                    "Bloch, 2017-2025 Bert Gijsbers."
                  << endl;
             exit(0);
         } else if (is_copying_switch(*pArg))
@@ -1048,54 +1091,58 @@ int main(int argc, char **argv) {
             no_only_child = true;
         else if (is_switch(*pArg, "S", "no-lone-hint"))
             no_only_child = no_only_child_hint = true;
-        else {
-            char *value = nullptr, *expand = nullptr;
-            if (GetArgument(value, "o", "output", pArg, argv + argc)) {
-                if (*value == '~')
-                    value = expand = tilde_expansion(value);
-                else if (*value == '$')
-                    value = expand = dollar_expansion(value);
-                if (nonempty(value)) {
-                    if (freopen(value, "w", stdout) == nullptr)
-                        fflush(stdout);
-                }
-                if (expand)
-                    delete[] expand;
-            } else if (GetArgument(value, "m", "match", pArg, argv + argc))
-                substr_filter = value;
-            else if (GetArgument(value, "M", "imatch", pArg, argv + argc))
-                substr_filter_nocase = value;
-            else if (GetArgument(value, "F", "flat-sep", pArg, argv + argc))
-                flat_sep = value;
-            else if (GetArgument(value, "t", "terminal", pArg, argv + argc))
-                terminal_option = value;
-            else if (GetArgument(value, "L", "limit-max-len", pArg,
-                                 argv + argc))
-                prog_name_cut = atoi(value);
-            else if (GetArgument(value, "d", "deadline-apps", pArg,
-                                 argv + argc))
-                opt_deadline_apps = value;
-            else if (GetArgument(value, "D", "deadline-all", pArg, argv + argc))
-                opt_deadline_all = value;
-            else {
-                if (argc == 2 && !(desktop_file_to_start = argv[1]).empty() &&
-                    endsWithSzAr(desktop_file_to_start, ".desktop")) {
-                    DBGMSG("shall invoke: " << desktop_file_to_start);
-                } else // unknown option
-                    help(true, EXIT_FAILURE);
-            }
-        }
+        else if (GetArgument(value, "o", "output", pArg, argv + argc)) {
+            char *expand = nullptr;
+            if (*value == '~')
+                value = expand = tilde_expansion(value);
+            else if (*value == '$')
+                value = expand = dollar_expansion(value);
+            if (nonempty(value)) {
+                if (freopen(value, "w", stdout) == nullptr)
+                    fflush(stdout);
+            }
+            if (expand)
+                delete[] expand;
+        }
+        else if (GetArgument(value, "m", "match", pArg, argv + argc))
+            substr_filter = value;
+        else if (GetArgument(value, "M", "imatch", pArg, argv + argc))
+            substr_filter_nocase = value;
+        else if (GetArgument(value, "F", "flat-sep", pArg, argv + argc))
+            flat_sep = value;
+        else if (GetArgument(value, "t", "terminal", pArg, argv + argc))
+            terminal_option = value;
+        else if (GetArgument(value, "l", "lang", pArg, argv + argc)) {
+            if (islower(value[0] & 0xff) || isEmpty(value))
+                msglang = value;
+        }
+        else if (GetArgument(value, "L", "limit-max-len", pArg, argv + argc))
+            prog_name_cut = atoi(value);
+        else if (GetArgument(value, "d", "deadline-apps", pArg, argv + argc))
+            opt_deadline_apps = value;
+        else if (GetArgument(value, "D", "deadline-all", pArg, argv + argc))
+            opt_deadline_all = value;
+        else if (argc == 2 && !(desktop_file_to_start = argv[1]).empty() &&
+            endsWithSzAr(desktop_file_to_start, ".desktop")) {
+            DBGMSG("shall invoke: " << desktop_file_to_start);
+        } else // unknown option
+            help(true, EXIT_FAILURE);
     }
 
-    const char *terminals[] = {terminal_option, getenv("TERMINAL"), TERM,
-                               "urxvt",         "alacritty",        "roxterm",
-                               "xterm"};
+    const char *terminals[7] = {terminal_option, getenv("TERMINAL"), TERM,
+                                "urxvt", "alacritty", "roxterm", "xterm"};
     for (auto term : terminals)
         if (term && (terminal_command = path_lookup(term)) != nullptr)
             break;
 
+    Lang lang(msglang);
+
+    for (auto rtl : rtls)
+        if (lang.lang == rtl)
+            right_to_left = true;
+
     if (!desktop_file_to_start.empty()) {
-        DesktopFile df(argv[1], Elvis(msglang, ""));
+        DesktopFile df(desktop_file_to_start, lang);
         auto cmd = df.GetCommand();
         if (cmd.empty())
             return EXIT_FAILURE;
@@ -1125,11 +1172,7 @@ int main(int argc, char **argv) {
     for (const auto &p : *(valid_paths.end() - 1))
         valid_main_cats.insert(*p.begin());
 
-    auto justLang = string(msglang ? msglang : "");
-    justLang = justLang.substr(0, justLang.find('.'));
-
-    MenuNode *leaky = new MenuNode;
-    auto &root = *leaky;
+    MenuNode root;
     bool in_timeout = false;
 
     {
@@ -1141,7 +1184,7 @@ int main(int argc, char **argv) {
                     return false;
                 }
 
-                auto df = DesktopFile::load_visible(std::move(fPath), justLang);
+                auto df = DesktopFile::load_visible(std::move(fPath), lang);
                 if (df)
                     root.sink_in(df);
 
@@ -1167,7 +1210,7 @@ int main(int argc, char **argv) {
                     return false;
                 }
 
-                auto df = DesktopFile::load_visible(std::move(fPath), justLang);
+                auto df = DesktopFile::load_visible(std::move(fPath), lang);
                 if (!df)
                     return true;
 
--- icewm-3.7.4.orig/src/icewmbg.cc
+++ icewm-3.7.4/src/icewmbg.cc
@@ -293,6 +293,7 @@ static bool hasImageExt(const char* name
             if (len == 4) {
                 if (strcmp(low, "jpeg") == 0 ||
                     (strcmp(low, "avif") == 0 && YImage::supportsFormat(low)) ||
+                    (strcmp(low, "svgz") == 0 && YImage::supportsFormat(low)) ||
                     (strcmp(low, "tiff") == 0 && YImage::supportsFormat(low)) ||
                     (strcmp(low, "webp") == 0 && YImage::supportsFormat(low)))
                     return true;
--- icewm-3.7.4.orig/src/wmapp.cc
+++ icewm-3.7.4/src/wmapp.cc
@@ -44,6 +44,7 @@
 char const *ApplicationName("IceWM");
 RebootShutdown rebootOrShutdown = Logout;
 static bool initializing(true);
+void SetLiteDefaults();
 
 YWMApp *wmapp;
 YWindowManager *manager;
@@ -1321,6 +1322,9 @@ YWMApp::YWMApp(int *argc, char ***argv,
     focusMode(loadFocusMode()),
     managerWindow(None)
 {
+    if(argc && *argc>0 && argv && *argv && **argv && mstring(**argv).endsWith("-lite"))
+            SetLiteDefaults();
+
     wmapp = this;
     YIcon::iconResourceLocator = this;
 
@@ -2108,6 +2112,14 @@ public:
     }
 };
 
+void SetLiteDefaults()
+{
+    showTaskBar = false;
+    fontPreferFreetype = false;
+    showWindowList = false;
+    quickSwitchAllIcons = false;
+    //addWorkspace(0, "1", false);
+}
 YWindow* YWMApp::splash(const char* splashFile) {
     YWindow* window(nullptr);
     if (splashFile && 4 < strlen(splashFile) && !post_preferences) {
--- icewm-3.7.4.orig/src/wmframe.cc
+++ icewm-3.7.4/src/wmframe.cc
@@ -1275,7 +1275,7 @@ void YFrameWindow::insertFrame(bool top)
 #endif
 }
 
-YFrameWindow *YFrameWindow::findWindow(int flags) {
+YFrameWindow* YFrameWindow::findByFlags(int flags) {
     YFrameWindow *p = this;
 
     if (flags & fwfNext)
@@ -1996,7 +1996,7 @@ void YFrameWindow::wmPrevWindow() {
 
     int flags = fwfNext | fwfVisible | fwfCycle |
                 fwfFocusable | fwfWorkspace | fwfSame;
-    YFrameWindow *f = findWindow(flags | fwfBackward);
+    YFrameWindow* f = findByFlags(flags | fwfBackward);
     if (f && f != this) {
         f->wmRaise();
         manager->setFocus(f, true);
@@ -2017,7 +2017,7 @@ void YFrameWindow::wmNextWindow() {
 
     int flags = fwfNext | fwfVisible | fwfCycle |
                 fwfFocusable | fwfWorkspace | fwfSame;
-    YFrameWindow *f = findWindow(flags);
+    YFrameWindow* f = findByFlags(flags);
     if (f && f != this) {
         wmLower();
         f->wmRaise();
--- icewm-3.7.4.orig/src/wmframe.h
+++ icewm-3.7.4/src/wmframe.h
@@ -197,7 +197,7 @@ public:
         fwfNotHidden  = 1 << 12 // not hidden
     };
 
-    YFrameWindow *findWindow(int flag);
+    YFrameWindow* findByFlags(int flags);
 
     void updateMenu();
     virtual void updateSubmenus();
--- icewm-3.7.4.orig/src/wmmgr.cc
+++ icewm-3.7.4/src/wmmgr.cc
@@ -2065,20 +2065,19 @@ void YWindowManager::focusTopWindow() {
         focusTop(topLayer());
 }
 
-bool YWindowManager::focusTop(YFrameWindow *f) {
-    if (!f)
-        return false;
-
-    f = f->findWindow(YFrameWindow::fwfVisible |
+bool YWindowManager::focusTop(YFrameWindow* frame) {
+    const int flags = YFrameWindow::fwfVisible |
                       YFrameWindow::fwfFocusable |
                       YFrameWindow::fwfNotHidden |
                       YFrameWindow::fwfWorkspace |
                       YFrameWindow::fwfSame |
                       YFrameWindow::fwfLayers |
-                      YFrameWindow::fwfCycle);
-    //msg("found focus %lX", f);
-    setFocus(f);
-    return f;
+                      YFrameWindow::fwfCycle;
+    if (frame) {
+        frame = frame->findByFlags(flags);
+        setFocus(frame);
+    }
+    return (frame != nullptr);
 }
 
 YFrameWindow *YWindowManager::getFrameUnderMouse(int workspace) {
