commit 8768ab3d7588019ea07a440a9cfd12679bc07d65 Author: Colin Clark Date: Thu Dec 10 16:43:33 2020 +0000 Ref #539: Run time check on GDK display backend (2) https://github.com/BestImageViewer/geeqie/issues/829 Include a run time check to determine which backend is being used. There was a seg. fault when Wayland was being used. diff --git a/src/layout.c b/src/layout.c index 2899d544..685e2005 100644 --- a/src/layout.c +++ b/src/layout.c @@ -2410,8 +2410,15 @@ void layout_sync_options_with_current_state(LayoutWindow *lw) #ifdef GDK_WINDOWING_X11 #if GTK_CHECK_VERSION(3,10,0) - window = gtk_widget_get_window(GTK_WIDGET(lw->window)); - lw->options.workspace = gdk_x11_window_get_desktop(window); + GdkDisplay *display; + + display = gdk_display_get_default(); + + if (GDK_IS_X11_DISPLAY(display)) + { + window = gtk_widget_get_window(GTK_WIDGET(lw->window)); + lw->options.workspace = gdk_x11_window_get_desktop(window); + } #endif #endif return;