From 12842e2e4e25e4cf4d67b0bedcbd61205b7b3a02 Mon Sep 17 00:00:00 2001 From: thermitegod <43489010+thermitegod@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:28:57 -0700 Subject: [PATCH] fix get_desktop_index() when running on wayland --- src/main-window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main-window.c b/src/main-window.c index f08cfb16d..7f937cf34 100644 --- a/src/main-window.c +++ b/src/main-window.c @@ -3918,6 +3918,12 @@ const GList* fm_main_window_get_all() static long get_desktop_index(GtkWindow* win) { + const gchar* wayland = g_getenv("WAYLAND_DISPLAY"); + if (wayland != NULL) + { + return -1; + } + long desktop = -1; GdkDisplay* display; GdkWindow* window = NULL;