After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746286 - nautilus-application: don't create desktop on Wayland
nautilus-application: don't create desktop on Wayland
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: 3.16
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 768893 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-03-16 14:23 UTC by Carlos Soriano
Modified: 2016-12-05 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
nautilus-application: don't create desktop on Wayland (2.38 KB, patch)
2015-03-16 14:23 UTC, Carlos Soriano
none Details | Review
nautilus-application: don't create desktop on Wayland (1.83 KB, patch)
2015-03-16 14:59 UTC, Carlos Soriano
none Details | Review
nautilus-application: don't create desktop on Wayland (1.65 KB, patch)
2015-03-16 15:39 UTC, Carlos Soriano
none Details | Review
nautilus-application: don't create desktop on Wayland (1.88 KB, patch)
2015-03-16 15:56 UTC, Carlos Soriano
committed Details | Review

Description Carlos Soriano 2015-03-16 14:23:45 UTC
Se patch
Comment 1 Carlos Soriano 2015-03-16 14:23:49 UTC
Created attachment 299510 [details] [review]
nautilus-application: don't create desktop on Wayland

We were doing some calls to the x11 backend, which are not supported
on Wayland and the application were crashing when creating the desktop
on Wayland.

To workaround it, simply don't create the desktop if we are on
Wayland.

Future work will be to split the main application and the desktop part.
Comment 2 Matthias Clasen 2015-03-16 14:31:19 UTC
Review of attachment 299510 [details] [review]:

::: src/nautilus-application.c
@@ +42,3 @@
 #include "nautilus-window.h"
 #include "nautilus-window-slot.h"
+#include <gdk/gdkwayland.h>

I think you need an #ifdef GDK_WINDOWING_WAYLAND around this include if you want it to work in wayland-less builds.

@@ +917,3 @@
+
+		return;
+	}

I think you should move this before the desktop_override check, otherwise you'll still crash if force-desktop is set ?
Comment 3 Carlos Soriano 2015-03-16 14:59:37 UTC
Created attachment 299518 [details] [review]
nautilus-application: don't create desktop on Wayland

We were doing some calls to the x11 backend, which are not supported
on Wayland and the application were crashing when creating the desktop
on Wayland.

To workaround it, simply don't create the desktop if we are on
Wayland.

Future work will be to split the main application and the desktop part.
Comment 4 Carlos Soriano 2015-03-16 15:00:22 UTC
> @@ +917,3 @@
> +
> +		return;
> +	}
> 
> I think you should move this before the desktop_override check, otherwise
> you'll still crash if force-desktop is set ?

hm no, it just returns as if x11 is not avilable does. So no harm here...no?
Comment 5 Matthias Clasen 2015-03-16 15:16:31 UTC
as discussed on irc: it may be better to check whether the default display is x11 instead, to get out of conditional linking against wayland
Comment 6 Carlos Soriano 2015-03-16 15:39:57 UTC
Created attachment 299524 [details] [review]
nautilus-application: don't create desktop on Wayland

We were doing some calls to the x11 backend, which are not supported
on Wayland and the application were crashing when creating the desktop
on Wayland.

To workaround it, simply don't create the desktop if we are on
Wayland.

Future work will be to split the main application and the desktop part.
Comment 7 Matthias Clasen 2015-03-16 15:50:27 UTC
Review of attachment 299524 [details] [review]:

::: src/nautilus-application.c
@@ +905,3 @@
+#ifdef GDK_WINDOWING_X11
+	GdkDisplay *display;
+	gboolean visible;

Are variables in the middle of the block are kosher in nautilus coding style ?

@@ +912,3 @@
+	if (!GDK_IS_X11_DISPLAY (display)) {
+		if (visible)
+			g_warning ("Desktop icons not supported on wayland. Desktop not created");

Maybe reword this warning to:

Desktop icons only supported on X11. Desktop not created

?

@@ +915,3 @@
+
+		return;
+	}

Same here ?

@@ +922,3 @@
+#endif
+
+	g_warning ("Desktop icons not supported on wayland. Desktop not created");

Same here ?
Comment 8 Carlos Soriano 2015-03-16 15:56:58 UTC
Created attachment 299526 [details] [review]
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.
Comment 9 Carlos Soriano 2015-03-16 15:57:59 UTC
Yeah, I was not sure if IFDEF blocks were special for declaring variables or not.
But they are not.

Pushed with changes

Attachment 299526 [details] pushed as c8f45f2 - nautilus-application: don't create desktop on Wayland
Comment 10 Carlos Soriano 2016-07-21 07:45:07 UTC
*** Bug 768893 has been marked as a duplicate of this bug. ***