summaryrefslogtreecommitdiff
path: root/src/Compositor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Compositor.cpp')
-rw-r--r--src/Compositor.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp
index 8e1b11b0..232ba4a6 100644
--- a/src/Compositor.cpp
+++ b/src/Compositor.cpp
@@ -2696,7 +2696,17 @@ WORKSPACEID CCompositor::getNewSpecialID() {
}
void CCompositor::performUserChecks() {
- ; // intentional
+ static auto PNOCHECKXDG = CConfigValue<Hyprlang::INT>("misc:disable_xdg_env_checks");
+
+ if (!*PNOCHECKXDG) {
+ const auto CURRENT_DESKTOP_ENV = getenv("XDG_CURRENT_DESKTOP");
+ if (!CURRENT_DESKTOP_ENV || std::string{CURRENT_DESKTOP_ENV} != "Hyprland") {
+ g_pHyprNotificationOverlay->addNotification(
+ std::format("Your XDG_CURRENT_DESKTOP environment seems to be managed externally, and the current value is {}.\nThis might cause issues unless it's intentional.",
+ CURRENT_DESKTOP_ENV ? CURRENT_DESKTOP_ENV : "unset"),
+ CColor{}, 15000, ICON_WARNING);
+ }
+ }
}
void CCompositor::moveWindowToWorkspaceSafe(PHLWINDOW pWindow, PHLWORKSPACE pWorkspace) {