summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2023-12-09 02:47:44 -0500
committerLuke from DC <[email protected]>2024-01-01 20:05:45 +0000
commit8bb93666b35ee6277071d1b5ab4d52ae57d06975 (patch)
tree450428fe273030cae321214cdaa69f67435a8feb
parent84fa213f8d0de6eaaf4b359877c3a03abe9cc00e (diff)
downloadcaja-8bb93666b35ee6277071d1b5ab4d52ae57d06975.tar.bz2
caja-8bb93666b35ee6277071d1b5ab4d52ae57d06975.tar.xz
wayland desktop: suppress spatial window warning
*When under wayland, silence "caja_spatial_window_show: assertion 'location != NULL' failed" *as the startup sequence is not the same with wlroots and the location isn't ready yet *Using gtk_widget_show instead of gtk_widget_realize in caja-desktop-window.c generates this warning
-rw-r--r--src/caja-spatial-window.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/caja-spatial-window.c b/src/caja-spatial-window.c
index 1028383d..df0baf28 100644
--- a/src/caja-spatial-window.c
+++ b/src/caja-spatial-window.c
@@ -313,6 +313,7 @@ caja_spatial_window_show (GtkWidget *widget)
CajaWindow *window;
CajaWindowSlot *slot;
GFile *location;
+ GdkDisplay *display;
window = CAJA_WINDOW (widget);
slot = caja_window_get_active_slot (window);
@@ -325,7 +326,17 @@ caja_spatial_window_show (GtkWidget *widget)
}
location = caja_window_slot_get_location (slot);
- g_return_if_fail (location != NULL);
+ display = gtk_widget_get_display (widget);
+
+ if (GDK_IS_X11_DISPLAY (display))
+ g_return_if_fail (location != NULL);
+
+ /*Return silently if this is a wayland desktop
+ *as the location isn't ready yet on first rendering
+ *but contents show fine, presumably from an update
+ */
+ else if (location == NULL)
+ return;
while (location != NULL) {
CajaFile *file;