]> git.sur5r.net Git - i3/i3/blobdiff - i3-dmenu-desktop
Raise floating window to top when it gets focus
[i3/i3] / i3-dmenu-desktop
index 1d29a69f21bb71d771a58988e0557f5b15c7ce10..aee5dc2f4e32eeb4b82099dc0633e1a911a6e0e4 100755 (executable)
@@ -279,6 +279,7 @@ for my $app (keys %apps) {
         }
 
         $choices{$name} = $app;
+        next;
     }
 
     if ((scalar grep { $_ eq 'command' } @entry_types) > 0) {
@@ -310,9 +311,10 @@ for my $app (keys %apps) {
 
         # Don’t add “geany” if “Geany” is already present.
         my @keys = map { lc } keys %choices;
-        next if (scalar grep { $_ eq lc(basename($command)) } @keys) > 0;
-
-        $choices{basename($command)} = $app;
+        if (!(scalar grep { $_ eq lc(basename($command)) } @keys) > 0) {
+            $choices{basename($command)} = $app;
+        }
+        next;
     }
 
     if ((scalar grep { $_ eq 'filename' } @entry_types) > 0) {