diff --git a/unix/gtkcompat.h b/unix/gtkcompat.h index ee84e878..17351aef 100644 --- a/unix/gtkcompat.h +++ b/unix/gtkcompat.h @@ -37,6 +37,8 @@ #define GDK_GRAB_SUCCESS GrabSuccess +#define GDK_WINDOW_XID GDK_WINDOW_XWINDOW + #define gtk_widget_set_size_request gtk_widget_set_usize #define gtk_radio_button_get_group gtk_radio_button_group #define gtk_notebook_set_current_page gtk_notebook_set_page diff --git a/unix/gtkfont.c b/unix/gtkfont.c index b504a7c8..b67dd8e3 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -511,6 +511,8 @@ static int x11font_has_glyph(unifont *font, wchar_t glyph) #if !GTK_CHECK_VERSION(2,0,0) #define GDK_DRAWABLE_XID(d) GDK_WINDOW_XWINDOW(d) /* GTK1's name for this */ +#elif GTK_CHECK_VERSION(3,0,0) +#define GDK_DRAWABLE_XID(d) GDK_WINDOW_XID(d) /* GTK3's name for this */ #endif static int x11font_width_16(unifont_drawctx *ctx, x11font_individual *xfi, diff --git a/unix/gtkwin.c b/unix/gtkwin.c index 2ec84d57..f4fcd42b 100644 --- a/unix/gtkwin.c +++ b/unix/gtkwin.c @@ -2996,7 +2996,7 @@ char *get_x_display(void *frontend) long get_windowid(void *frontend) { struct gui_data *inst = (struct gui_data *)frontend; - return (long)GDK_WINDOW_XWINDOW(gtk_widget_get_window(inst->area)); + return (long)GDK_WINDOW_XID(gtk_widget_get_window(inst->area)); } #endif