]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
GTK3 port: respell GDK_WINDOW_XWINDOW / GDK_DRAWABLE_XID.
authorSimon Tatham <anakin@pobox.com>
Sun, 16 Aug 2015 13:16:23 +0000 (14:16 +0100)
committerSimon Tatham <anakin@pobox.com>
Sun, 16 Aug 2015 13:50:48 +0000 (14:50 +0100)
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.

unix/gtkcompat.h
unix/gtkfont.c
unix/gtkwin.c

index ee84e87874888bf4836a6b9e09f48ecaba5bcb8c..17351aef90cd647ea738286bcb41230dcc71a3bb 100644 (file)
@@ -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
index b504a7c8b85089c1f4d85e0661b50b909c16fd46..b67dd8e3de63b8165fac2f9301ea385633ed7e66 100644 (file)
@@ -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,
index 2ec84d57f513caadb1c4db1d4243d5d076fbd4ea..f4fcd42b552933a837900adac8c320389bc301fc 100644 (file)
@@ -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