mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
nautilus-application: don't create desktop on Wayland
We were doing some calls to the x11 backend, which are not supported on Wayland (or another backend diferent than X11) and the application were crashing when creating the desktop on Wayland. To workaround it, simply don't create the desktop if we are on a different backend than X11. Future work will be to split the main application and the desktop part. https://bugzilla.gnome.org/show_bug.cgi?id=746286
This commit is contained in:
parent
f826a582a1
commit
c8f45f2923
1 changed files with 20 additions and 2 deletions
|
@ -897,13 +897,31 @@ nautilus_application_set_desktop_visible (NautilusApplication *self,
|
|||
static void
|
||||
update_desktop_from_gsettings (NautilusApplication *self)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
gboolean visible;
|
||||
|
||||
/* desktop GSetting was overridden - don't do anything */
|
||||
if (self->priv->desktop_override) {
|
||||
return;
|
||||
}
|
||||
|
||||
nautilus_application_set_desktop_visible (self, g_settings_get_boolean (gnome_background_preferences,
|
||||
NAUTILUS_PREFERENCES_SHOW_DESKTOP));
|
||||
#ifdef GDK_WINDOWING_X11
|
||||
display = gdk_display_get_default ();
|
||||
visible = g_settings_get_boolean (gnome_background_preferences,
|
||||
NAUTILUS_PREFERENCES_SHOW_DESKTOP);
|
||||
if (!GDK_IS_X11_DISPLAY (display)) {
|
||||
if (visible)
|
||||
g_warning ("Desktop icons only supported on X11. Desktop not created");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
nautilus_application_set_desktop_visible (self, visible);
|
||||
|
||||
return;
|
||||
#endif
|
||||
|
||||
g_warning ("Desktop icons only supported on X11. Desktop not created");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue