Remove some run-time dependencies on X11 backend with GTK3

As with Wayland, the X11 backend may not be available at run-time,
so types defined in it can't be used
This commit is contained in:
Paul Cornett
2021-02-02 10:15:35 -08:00
parent 3514dda407
commit 55b7198e92
6 changed files with 47 additions and 13 deletions

View File

@@ -1020,7 +1020,11 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
}
#ifdef GDK_WINDOWING_X11
if (GDK_IS_X11_DISPLAY(gdk_window_get_display(gdk_event->window)))
#ifdef __WXGTK3__
if (strcmp("GdkX11Window", g_type_name(G_TYPE_FROM_INSTANCE(gdk_event->window))) == 0)
#else
if (true)
#endif
{
// we want to always get the same key code when the same key is
// pressed regardless of the state of the modifiers, i.e. on a