Sign up

GtkD on Xorg and Wayland

Is there a standard idiom for distinguishing when running GtkD code on Xorg from when running on Wayland?

I am sure there must be an example somewhere in the GtkD demos and/or the Web, but I am failing to find it.

Re: GtkD on Xorg and Wayland

On 03/11/2016 08:57 AM, Russel Winder wrote:

Is there a standard idiom for distinguishing when running GtkD code on Xorg from when running on Wayland?

I am sure there must be an example somewhere in the GtkD demos and/or the Web, but I am failing to find it.

In C there is a macro to check if the wayland backend is used:
GDKWINDOWINGWAYLAND.
But i can't seem to find it's definition, and i don't know any other way
to check witch windowing system is used.

Re: GtkD on Xorg and Wayland

I have switched to using a GStreamer element that is also a GTK+ widget. This avoids all the X11 specific overlaying. Now I do not need to know if the platform is Wayland or not. :-)