Re: Detecting the gdk backend

2019-02-07 Thread rastersoft
Hi: You have the GDK_IS_WAYLAND_DISPLAY() C macro. You have an example in my program Terminus ( https://gitlab.com/rastersoft/terminus ), in the 'checkwayland.c' and 'checkwayland.vapi' files (which is also an example of how to do it in Vala, BTW). El 8/2/19 a las 6:28, Daniel Kasak via gtk-

Re: Detecting the gdk backend

2019-02-07 Thread Luca Bacci via gtk-app-devel-list
Hi! There is some reference code here: https://developer.gnome.org/gdk3/stable/gdk3-Wayland-Interaction.html https://developer.gnome.org/gdk3/stable/gdk3-X-Window-System-Interaction.html - Include the backend specific headers: gdk/gdkx.h, gdk/gdkwayland.h - Link with backend specific libs: g

Detecting the gdk backend

2019-02-06 Thread Daniel Kasak via gtk-app-devel-list
Hi all. Is there a way to detect the gdk backend an app is using? I know about the environment variable - GDK_BACKEND. But often this is not set, and gtk just picks whatever's available. I need ever-so-slightly different app behaviour, depending on the backend. Any ideas? Dan _