summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--display-gtk.h4
-rw-r--r--gtk-gui.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/display-gtk.h b/display-gtk.h
index b2903d7e9..a7279fa9a 100644
--- a/display-gtk.h
+++ b/display-gtk.h
@@ -3,6 +3,10 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
+#if GTK_CHECK_VERSION(2,22,0)
+#include <gdk/gdkkeysyms-compat.h>
+#endif
extern GtkWidget *main_window;
diff --git a/gtk-gui.c b/gtk-gui.c
index a2f5e00f1..139775c08 100644
--- a/gtk-gui.c
+++ b/gtk-gui.c
@@ -5,7 +5,6 @@
*/
#include <libintl.h>
#include <glib/gi18n.h>
-#include <gdk/gdkkeysyms.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -1151,16 +1150,16 @@ static gboolean on_key_press(GtkWidget *w, GdkEventKey *event, GtkWidget *diveli
if (event->type != GDK_KEY_PRESS)
return FALSE;
switch (event->keyval) {
- case GDK_KEY_Up:
+ case GDK_Up:
select_prev_dive();
return TRUE;
- case GDK_KEY_Down:
+ case GDK_Down:
select_next_dive();
return TRUE;
- case GDK_KEY_Left:
+ case GDK_Left:
prev_dc(NULL, NULL);
return TRUE;
- case GDK_KEY_Right:
+ case GDK_Right:
next_dc(NULL, NULL);
return TRUE;
}