Can Scintilla tell if its X or Wayland, thats a runtime check IIUC?
Wayland was (is?) optional at both build-time and run-time so Scintilla tests at run-time but only runs that code if there was build support: ~~~c++ #if defined(GDK_WINDOWING_WAYLAND) GdkDisplay *pdisplay = gdk_display_get_default(); if (GDK_IS_WAYLAND_DISPLAY(pdisplay)) { // ... } #endif ~~~
Ok, but the patch [here](https://gitlab.gnome.org/GNOME/gtk/-/issues/5397) is for an issue in Scite.
The commonly used versions of SciTE run directly on Win32 and macOS APIs which allows richer platform integration like supporting the `MSDEVColumnSelect` clipboard format on Win32 or dragging 'ghost' text on macOS. Therefore, SciTE for GTK's behaviour on Win32 or macOS isn't very important and I don't test it. It may work and I'll accept patches but its not mainstream.
For Geany, running on Win32 or macOS means running through GTK and its wrapping of platform APIs so there is much more scope for problems to occur in Geany with these changes.
See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5300, hopefully now the right atom (small integer) will be provided.
While the patch may be good, there are two target values involved here which I was trying to separate. There is a target atom and a target enumeration. The target atom is in a global atom table to allow interop and the target enumeration is local to the client code and is not an atom. The target enumeration goes into the `info` field of the `GtkTargetEntry` struct which is defined as:
An application-assigned integer ID which will get passed as a parameter to e.g the GtkWidget::selection-get signal. It allows the application to identify the target type without extensive string compares.
https://docs.gtk.org/gtk3/struct.TargetEntry.html