Skip to content

Commit

Permalink
Account for XDG_CURRENT_DESKTOP being unset (#2273)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix-Starlight authored Jan 26, 2024
1 parent 7a62284 commit a792601
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.caffeinemc.mods.sodium.desktop.utils.browse;

import java.io.IOException;
import java.util.Objects;

class GNOMEImpl implements BrowseUrlHandler {
public static boolean isSupported() {
return XDGImpl.isSupported() && System.getenv("XDG_CURRENT_DESKTOP").equals("GNOME");
return XDGImpl.isSupported() && Objects.equals(System.getenv("XDG_CURRENT_DESKTOP"), "GNOME");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package net.caffeinemc.mods.sodium.desktop.utils.browse;

import java.io.IOException;
import java.util.Objects;

class KDEImpl implements BrowseUrlHandler {
public static boolean isSupported() {
return XDGImpl.isSupported() && System.getenv("XDG_CURRENT_DESKTOP").equals("KDE");
return XDGImpl.isSupported() && Objects.equals(System.getenv("XDG_CURRENT_DESKTOP"), "KDE");
}

@Override
Expand Down

0 comments on commit a792601

Please sign in to comment.