diff --git a/src/output.c b/src/output.c index de0d412..48f0782 100644 --- a/src/output.c +++ b/src/output.c @@ -5,14 +5,15 @@ #include "x11/screen.h" #include "wayland/wl.h" +bool running_xwayland; + const bool is_running_wayland(void) { char* wayland_display = getenv("WAYLAND_DISPLAY"); return !(wayland_display == NULL); } const bool is_running_xwayland(void) { - // FIXME - return false; + return running_xwayland; } const struct output output_x11 = { @@ -57,6 +58,7 @@ const struct output output_wl = { const struct output* output_create(bool force_xwayland) { + running_xwayland = force_xwayland; if (!force_xwayland && is_running_wayland()) { LOG_I("Using Wayland output"); return &output_wl; diff --git a/src/queues.c b/src/queues.c index 6892953..62313ad 100644 --- a/src/queues.c +++ b/src/queues.c @@ -143,9 +143,12 @@ static bool queues_notification_is_finished(struct notification *n, struct dunst bool is_idle = status.fullscreen ? false : status.idle; + /* There is no way to detect if the user is idle + * on xwayland, so assume they aren't */ + if (is_running_xwayland()) is_idle = false; + /* don't timeout when user is idle */ - /* NOTE: Idle is not working on xwayland */ - if (is_idle && !n->transient && !is_running_xwayland()) { + if (is_idle && !n->transient) { n->start = time_monotonic_now(); return false; }