diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index a6d5457225..ab35ae0f20 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -1537,7 +1537,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, wxEventType event_type = wxEVT_NULL; -#ifdef __WXGTK20__ + // GdkDisplay is a GTK+ 2.1.0 thing +#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 1, 0) if ( gdk_event->type == GDK_2BUTTON_PRESS && gdk_event->button >= 1 && gdk_event->button <= 3 ) { diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index a6d5457225..ab35ae0f20 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -1537,7 +1537,8 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, wxEventType event_type = wxEVT_NULL; -#ifdef __WXGTK20__ + // GdkDisplay is a GTK+ 2.1.0 thing +#if defined(__WXGTK20__) && GTK_CHECK_VERSION(2, 1, 0) if ( gdk_event->type == GDK_2BUTTON_PRESS && gdk_event->button >= 1 && gdk_event->button <= 3 ) {