From 7eef4a45493f6a5193c22c6157625b3ae08dcde9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 22 May 2018 17:01:07 +0200 Subject: [PATCH] Fix build with GTK+ < 2.20 due to undefined key code constants Include gdk/gdkkeysyms.h from wx/gtk/private/gtk2-compat.h as it must be included before it for the compatibility header to define the new names for the key constants even when using old GTK+ versions. --- include/wx/gtk/private/gtk2-compat.h | 2 ++ src/gtk/listbox.cpp | 2 -- src/gtk/radiobox.cpp | 2 -- src/gtk/window.cpp | 2 -- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/wx/gtk/private/gtk2-compat.h b/include/wx/gtk/private/gtk2-compat.h index 15052403c8..65c76cc7b2 100644 --- a/include/wx/gtk/private/gtk2-compat.h +++ b/include/wx/gtk/private/gtk2-compat.h @@ -539,6 +539,8 @@ static inline void wx_gtk_widget_get_preferred_size(GtkWidget* widget, GtkRequis } #define gtk_widget_get_preferred_size wx_gtk_widget_get_preferred_size +#include + #if defined(GDK_Alt_L) && !defined(GDK_KEY_Alt_L) #define GDK_KEY_Alt_L GDK_Alt_L #define GDK_KEY_Alt_R GDK_Alt_R diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index 78b5255668..0a0f6a8c0f 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -34,8 +34,6 @@ #include "wx/gtk/private/treeentry_gtk.h" #include "wx/gtk/private/treeview.h" -#include - //----------------------------------------------------------------------------- // data //----------------------------------------------------------------------------- diff --git a/src/gtk/radiobox.cpp b/src/gtk/radiobox.cpp index b59022bd4b..635fba4a87 100644 --- a/src/gtk/radiobox.cpp +++ b/src/gtk/radiobox.cpp @@ -19,8 +19,6 @@ #include "wx/gtk/private.h" -#include - //----------------------------------------------------------------------------- // wxGTKRadioButtonInfo //----------------------------------------------------------------------------- diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index fa49c0f2d9..e6889a3549 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -44,8 +44,6 @@ #include "wx/private/textmeasure.h" using namespace wxGTKImpl; -#include - #ifdef GDK_WINDOWING_X11 #include #include "wx/x11/private/wrapxkb.h"