1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

GTK3 port: respell GDK_WINDOW_XWINDOW / GDK_DRAWABLE_XID.

GDK3 now spells both of those as GDK_WINDOW_XID. (Of course 'drawable'
is no longer a relevant concept in GDK3, since pixmaps are no longer
supported and so all drawables are just windows.) We keep backwards
compatibility, of course.
This commit is contained in:
Simon Tatham 2015-08-16 14:16:23 +01:00
parent aac9d5fcf7
commit 0ffc564351
3 changed files with 5 additions and 1 deletions

View File

@ -37,6 +37,8 @@
#define GDK_GRAB_SUCCESS GrabSuccess #define GDK_GRAB_SUCCESS GrabSuccess
#define GDK_WINDOW_XID GDK_WINDOW_XWINDOW
#define gtk_widget_set_size_request gtk_widget_set_usize #define gtk_widget_set_size_request gtk_widget_set_usize
#define gtk_radio_button_get_group gtk_radio_button_group #define gtk_radio_button_get_group gtk_radio_button_group
#define gtk_notebook_set_current_page gtk_notebook_set_page #define gtk_notebook_set_current_page gtk_notebook_set_page

View File

@ -511,6 +511,8 @@ static int x11font_has_glyph(unifont *font, wchar_t glyph)
#if !GTK_CHECK_VERSION(2,0,0) #if !GTK_CHECK_VERSION(2,0,0)
#define GDK_DRAWABLE_XID(d) GDK_WINDOW_XWINDOW(d) /* GTK1's name for this */ #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 #endif
static int x11font_width_16(unifont_drawctx *ctx, x11font_individual *xfi, static int x11font_width_16(unifont_drawctx *ctx, x11font_individual *xfi,

View File

@ -2996,7 +2996,7 @@ char *get_x_display(void *frontend)
long get_windowid(void *frontend) long get_windowid(void *frontend)
{ {
struct gui_data *inst = (struct gui_data *)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 #endif