使用 DDE 桌面时启用窗口动画 (#3682)
This commit is contained in:
@@ -36,13 +36,15 @@ public final class AnimationUtils {
|
|||||||
public static void init() {
|
public static void init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final boolean enabled = !ConfigHolder.config().isAnimationDisabled();
|
private static final boolean ENABLED = !ConfigHolder.config().isAnimationDisabled();
|
||||||
|
private static final boolean PLAY_WINDOW_ANIMATION = ENABLED
|
||||||
|
&& (!OperatingSystem.CURRENT_OS.isLinuxOrBSD() || "DDE".equals(System.getenv("XDG_CURRENT_DESKTOP")));
|
||||||
|
|
||||||
public static boolean isAnimationEnabled() {
|
public static boolean isAnimationEnabled() {
|
||||||
return enabled;
|
return ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean playWindowAnimation() {
|
public static boolean playWindowAnimation() {
|
||||||
return isAnimationEnabled() && !OperatingSystem.CURRENT_OS.isLinuxOrBSD();
|
return PLAY_WINDOW_ANIMATION;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user