summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-10-24 13:10:49 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-01 10:05:46 +0000
commitac7074751696b05d73b1c93cd2b76bc9538813cf (patch)
tree86a4379efd6dc2da319266f61d97cceef4faa8e4 /meta/recipes-gnome
parent2b1cfd438e5f64142b65b1a9247bab04db61f3ec (diff)
downloadpoky-ac7074751696b05d73b1c93cd2b76bc9538813cf.tar.gz
gtk+3: Upgrade 3.20.9 -> 3.22.1
Six-monthly feature release. * Rebase the --disable-opengl patch. * Remove a backported patch. * Inherit gettext as that seems to have been missing. (From OE-Core rev: d1dce7adbc649925bc9285798bf464b1e6f3d84d) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3.inc2
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch39
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch365
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3_3.22.1.bb (renamed from meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb)5
4 files changed, 132 insertions, 279 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3.inc b/meta/recipes-gnome/gtk+/gtk+3.inc
index c3a96fadb8..745c6fa5de 100644
--- a/meta/recipes-gnome/gtk+/gtk+3.inc
+++ b/meta/recipes-gnome/gtk+/gtk+3.inc
@@ -10,7 +10,7 @@ DEPENDS = "glib-2.0 cairo pango atk jpeg libpng gdk-pixbuf \
10 10
11LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+" 11LICENSE = "LGPLv2 & LGPLv2+ & LGPLv2.1+"
12 12
13inherit autotools pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check upstream-version-is-even gobject-introspection 13inherit autotools gettext pkgconfig gtk-doc update-alternatives gtk-immodules-cache gsettings distro_features_check upstream-version-is-even gobject-introspection
14ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" 14ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}"
15 15
16# This should be in autotools.bbclass, but until something elses uses it putting 16# This should be in autotools.bbclass, but until something elses uses it putting
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch b/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch
deleted file mode 100644
index e819add889..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3/0001-Redo-focus-handling-in-treeview-once-more.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1Upstream-Status: Backport [29faa2db]
2Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
3
4
5From 29faa2db44b04b9cf7f4d96e32691f424490c730 Mon Sep 17 00:00:00 2001
6From: Matthias Clasen <mclasen@redhat.com>
7Date: Sun, 11 Sep 2016 11:47:55 -0400
8Subject: [PATCH] Redo focus handling in treeview once more
9
10The fix for bug 767468 had some unintended side-effects. This is
11an attempt at doing the same fix (don't grab focus when we are
12grab-shadowed), while avoiding the breakage, by using GTK+'s
13internal tracking for grab-shadowed-ness.
14
15https://bugzilla.gnome.org/show_bug.cgi?id=770508
16---
17 gtk/gtktreeview.c | 3 +--
18 1 file changed, 1 insertion(+), 2 deletions(-)
19
20diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
21index a7463cc..73d3557 100644
22--- a/gtk/gtktreeview.c
23+++ b/gtk/gtktreeview.c
24@@ -3050,11 +3050,10 @@ static void
25 grab_focus_and_unset_draw_keyfocus (GtkTreeView *tree_view)
26 {
27 GtkWidget *widget = GTK_WIDGET (tree_view);
28- GtkWidget *grab_widget = gtk_grab_get_current ();
29
30 if (gtk_widget_get_can_focus (widget) &&
31 !gtk_widget_has_focus (widget) &&
32- (!grab_widget || grab_widget == widget))
33+ !_gtk_widget_get_shadowed (widget))
34 gtk_widget_grab_focus (widget);
35
36 tree_view->priv->draw_keyfocus = 0;
37--
382.9.3
39
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch b/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
index 0912c44ff3..e6ee21b64f 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
@@ -1,7 +1,7 @@
1From a8fa547fdc1416b330aced805f5343ad912932ae Mon Sep 17 00:00:00 2001 1From cdfd6216ac49fc7622d563d671a5b6511492827d Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 21 Jun 2016 15:11:39 +0300 3Date: Tue, 21 Jun 2016 15:11:39 +0300
4Subject: [PATCH 3/4] Add --disable-opengl configure option 4Subject: [PATCH] Add --disable-opengl configure option
5 5
6--disable-opengl will remove the dependency on libepoxy and on the 6--disable-opengl will remove the dependency on libepoxy and on the
7OpenGL APIs. This is useful for those who want to keep using gtk+3 7OpenGL APIs. This is useful for those who want to keep using gtk+3
@@ -14,40 +14,41 @@ the very least modified.
14 14
15The patch is _not_ great from a maintenance point of view and 15The patch is _not_ great from a maintenance point of view and
16modifying the library API is also a fairly nasty thing to do. 16modifying the library API is also a fairly nasty thing to do.
17Long-term it would be good to find an alternative solution to this 17Next long term release (4.0) will require alternative solutions
18(maybe a no-op backend for libepoxy?) 18as it actually will depend on OpenGL.
19 19
20Upstream-Status: Inappropriate [Evil eye expected from upstream] 20Upstream-Status: Inappropriate [Evil eye expected from upstream]
21Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> 21Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
22--- 22---
23 configure.ac | 13 +++++++++++-- 23 configure.ac | 13 +++++--
24 demos/gtk-demo/glarea.c | 13 +++++++++++++ 24 demos/gtk-demo/glarea.c | 13 +++++++
25 docs/tools/Makefile.am | 9 +++++++-- 25 docs/tools/Makefile.am | 9 +++--
26 docs/tools/widgets.c | 4 +++- 26 docs/tools/widgets.c | 4 ++-
27 gdk/gdkdisplay.c | 4 +++- 27 gdk/gdkdisplay.c | 4 ++-
28 gdk/gdkgl.c | 10 ++++++++++ 28 gdk/gdkgl.c | 10 ++++++
29 gdk/gdkglcontext.c | 6 ++++++ 29 gdk/gdkglcontext.c | 6 ++++
30 gdk/gdkwindow.c | 13 +++++++++++++ 30 gdk/gdkwindow.c | 13 +++++++
31 gdk/x11/Makefile.am | 30 ++++++++++++++++++++++++++---- 31 gdk/x11/Makefile.am | 30 +++++++++++++---
32 gdk/x11/gdkdisplay-x11.c | 6 +++++- 32 gdk/x11/gdkdisplay-x11.c | 6 +++-
33 gdk/x11/gdkscreen-x11.c | 5 +++++ 33 gdk/x11/gdkscreen-x11.c | 5 +++
34 gdk/x11/gdkwindow-x11.c | 4 ++++ 34 gdk/x11/gdkwindow-x11.c | 4 +++
35 gdk/x11/gdkx-autocleanups.h | 2 ++ 35 gdk/x11/gdkx-autocleanups.h | 2 ++
36 gdk/x11/gdkx-with-gl-context.h | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 36 gdk/x11/{gdkx.h => gdkx-with-gl-context.h} | 1 -
37 gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 37 gdk/x11/gdkx-without-gl-context.h | 58 ++++++++++++++++++++++++++++++
38 gdk/x11/gdkx.h | 59 ----------------------------------------------------------- 38 gtk/Makefile.am | 3 +-
39 gtk/Makefile.am | 3 +-- 39 gtk/gtkglarea.c | 20 ++++++++++-
40 gtk/gtkglarea.c | 20 +++++++++++++++++++- 40 gtk/inspector/general.c | 6 ++++
41 gtk/inspector/general.c | 6 ++++++ 41 tests/Makefile.am | 10 ++++--
42 tests/Makefile.am | 10 +++++++--- 42 testsuite/gtk/objects-finalize.c | 2 ++
43 testsuite/gtk/objects-finalize.c | 2 ++ 43 20 files changed, 201 insertions(+), 18 deletions(-)
44 21 files changed, 260 insertions(+), 76 deletions(-) 44 rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (98%)
45 create mode 100644 gdk/x11/gdkx-without-gl-context.h
45 46
46diff --git a/configure.ac b/configure.ac 47diff --git a/configure.ac b/configure.ac
47index a01824e..dde9dc5 100644 48index 1cfdbc4..2d1a945 100644
48--- a/configure.ac 49--- a/configure.ac
49+++ b/configure.ac 50+++ b/configure.ac
50@@ -342,6 +342,15 @@ AC_ARG_ENABLE(mir-backend, 51@@ -346,6 +346,15 @@ AC_ARG_ENABLE(mir-backend,
51 [enable the Mir gdk backend])], 52 [enable the Mir gdk backend])],
52 [backend_set=yes]) 53 [backend_set=yes])
53 54
@@ -63,7 +64,7 @@ index a01824e..dde9dc5 100644
63 AC_ARG_ENABLE(glx, 64 AC_ARG_ENABLE(glx,
64 [AS_HELP_STRING([--enable-glx], 65 [AS_HELP_STRING([--enable-glx],
65 [When enabled Gdk will try to initialize GLX])]) 66 [When enabled Gdk will try to initialize GLX])])
66@@ -1333,7 +1342,7 @@ CFLAGS="$saved_cflags" 67@@ -1352,7 +1361,7 @@ CFLAGS="$saved_cflags"
67 LDFLAGS="$saved_ldflags" 68 LDFLAGS="$saved_ldflags"
68 69
69 GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version" 70 GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version"
@@ -72,7 +73,7 @@ index a01824e..dde9dc5 100644
72 73
73 PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES) 74 PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
74 GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB" 75 GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
75@@ -1367,7 +1376,7 @@ fi 76@@ -1386,7 +1395,7 @@ fi
76 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES) 77 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
77 78
78 GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version" 79 GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
@@ -82,11 +83,14 @@ index a01824e..dde9dc5 100644
82 GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2" 83 GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
83 fi 84 fi
84diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c 85diff --git a/demos/gtk-demo/glarea.c b/demos/gtk-demo/glarea.c
85index 3aba729..c6c79f7 100644 86index 715b067..4a9c7c8 100644
86--- a/demos/gtk-demo/glarea.c 87--- a/demos/gtk-demo/glarea.c
87+++ b/demos/gtk-demo/glarea.c 88+++ b/demos/gtk-demo/glarea.c
88@@ -5,7 +5,9 @@ 89@@ -3,9 +3,12 @@
90 * GtkGLArea is a widget that allows custom drawing using OpenGL calls.
91 */
89 92
93+#include "config.h"
90 #include <math.h> 94 #include <math.h>
91 #include <gtk/gtk.h> 95 #include <gtk/gtk.h>
92+#if HAVE_OPENGL 96+#if HAVE_OPENGL
@@ -104,7 +108,7 @@ index 3aba729..c6c79f7 100644
104 /* The object we are drawing */ 108 /* The object we are drawing */
105 static const GLfloat vertex_data[] = { 109 static const GLfloat vertex_data[] = {
106 0.f, 0.5f, 0.f, 1.f, 110 0.f, 0.5f, 0.f, 1.f,
107@@ -213,6 +217,7 @@ compute_mvp (float *res, 111@@ -215,6 +219,7 @@ compute_mvp (float *res,
108 static GLuint position_buffer; 112 static GLuint position_buffer;
109 static GLuint program; 113 static GLuint program;
110 static GLuint mvp_location; 114 static GLuint mvp_location;
@@ -112,18 +116,18 @@ index 3aba729..c6c79f7 100644
112 116
113 /* We need to set up our state when we realize the GtkGLArea widget */ 117 /* We need to set up our state when we realize the GtkGLArea widget */
114 static void 118 static void
115@@ -223,8 +228,10 @@ realize (GtkWidget *widget) 119@@ -241,8 +246,10 @@ realize (GtkWidget *widget)
116 if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL) 120 fragment_path = "/glarea/glarea-gl.fs.glsl";
117 return; 121 }
118 122
119+#ifdef HAVE_OPENGL 123+#ifdef HAVE_OPENGL
120 init_buffers (&position_buffer, NULL); 124 init_buffers (&position_buffer, NULL);
121 init_shaders (&program, &mvp_location); 125 init_shaders (vertex_path, fragment_path, &program, &mvp_location);
122+#endif 126+#endif
123 } 127 }
124 128
125 /* We should tear down the state when unrealizing */ 129 /* We should tear down the state when unrealizing */
126@@ -236,10 +243,13 @@ unrealize (GtkWidget *widget) 130@@ -254,10 +261,13 @@ unrealize (GtkWidget *widget)
127 if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL) 131 if (gtk_gl_area_get_error (GTK_GL_AREA (widget)) != NULL)
128 return; 132 return;
129 133
@@ -137,7 +141,7 @@ index 3aba729..c6c79f7 100644
137 static void 141 static void
138 draw_triangle (void) 142 draw_triangle (void)
139 { 143 {
140@@ -272,6 +282,7 @@ draw_triangle (void) 144@@ -290,6 +300,7 @@ draw_triangle (void)
141 glBindBuffer (GL_ARRAY_BUFFER, 0); 145 glBindBuffer (GL_ARRAY_BUFFER, 0);
142 glUseProgram (0); 146 glUseProgram (0);
143 } 147 }
@@ -145,7 +149,7 @@ index 3aba729..c6c79f7 100644
145 149
146 static gboolean 150 static gboolean
147 render (GtkGLArea *area, 151 render (GtkGLArea *area,
148@@ -280,6 +291,7 @@ render (GtkGLArea *area, 152@@ -298,6 +309,7 @@ render (GtkGLArea *area,
149 if (gtk_gl_area_get_error (area) != NULL) 153 if (gtk_gl_area_get_error (area) != NULL)
150 return FALSE; 154 return FALSE;
151 155
@@ -153,7 +157,7 @@ index 3aba729..c6c79f7 100644
153 /* Clear the viewport */ 157 /* Clear the viewport */
154 glClearColor (0.5, 0.5, 0.5, 1.0); 158 glClearColor (0.5, 0.5, 0.5, 1.0);
155 glClear (GL_COLOR_BUFFER_BIT); 159 glClear (GL_COLOR_BUFFER_BIT);
156@@ -289,6 +301,7 @@ render (GtkGLArea *area, 160@@ -307,6 +319,7 @@ render (GtkGLArea *area,
157 161
158 /* Flush the contents of the pipeline */ 162 /* Flush the contents of the pipeline */
159 glFlush (); 163 glFlush ();
@@ -204,10 +208,10 @@ index 932daf1..54239d6 100644
204 208
205 return info; 209 return info;
206diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c 210diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
207index 6150ef7..2223629 100644 211index ed0e65f..1f81b71 100644
208--- a/gdk/gdkdisplay.c 212--- a/gdk/gdkdisplay.c
209+++ b/gdk/gdkdisplay.c 213+++ b/gdk/gdkdisplay.c
210@@ -2360,7 +2360,9 @@ gboolean 214@@ -2409,7 +2409,9 @@ gboolean
211 gdk_display_make_gl_context_current (GdkDisplay *display, 215 gdk_display_make_gl_context_current (GdkDisplay *display,
212 GdkGLContext *context) 216 GdkGLContext *context)
213 { 217 {
@@ -219,7 +223,7 @@ index 6150ef7..2223629 100644
219 223
220 GdkRenderingMode 224 GdkRenderingMode
221diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c 225diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
222index e8ba770..ba7c84b 100644 226index 51d2b02..efa9e95 100644
223--- a/gdk/gdkgl.c 227--- a/gdk/gdkgl.c
224+++ b/gdk/gdkgl.c 228+++ b/gdk/gdkgl.c
225@@ -22,7 +22,9 @@ 229@@ -22,7 +22,9 @@
@@ -240,7 +244,7 @@ index e8ba770..ba7c84b 100644
240 static const char * 244 static const char *
241 get_vertex_type_name (int type) 245 get_vertex_type_name (int type)
242 { 246 {
243@@ -254,6 +257,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data) 247@@ -208,6 +211,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
244 glUseProgram (paint_data->current_program->program); 248 glUseProgram (paint_data->current_program->program);
245 } 249 }
246 } 250 }
@@ -248,15 +252,15 @@ index e8ba770..ba7c84b 100644
248 252
249 void 253 void
250 gdk_gl_texture_quads (GdkGLContext *paint_context, 254 gdk_gl_texture_quads (GdkGLContext *paint_context,
251@@ -261,6 +265,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, 255@@ -216,6 +220,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
252 int n_quads, 256 GdkTexturedQuad *quads,
253 GdkTexturedQuad *quads) 257 gboolean flip_colors)
254 { 258 {
255+#ifdef HAVE_OPENGL 259+#ifdef HAVE_OPENGL
256 GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context); 260 GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
257 GdkGLContextProgram *program; 261 GdkGLContextProgram *program;
258 GdkWindow *window = gdk_gl_context_get_window (paint_context); 262 GdkWindow *window = gdk_gl_context_get_window (paint_context);
259@@ -324,6 +329,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, 263@@ -289,6 +294,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
260 264
261 glDisableVertexAttribArray (program->position_location); 265 glDisableVertexAttribArray (program->position_location);
262 glDisableVertexAttribArray (program->uv_location); 266 glDisableVertexAttribArray (program->uv_location);
@@ -264,7 +268,7 @@ index e8ba770..ba7c84b 100644
264 } 268 }
265 269
266 /* x,y,width,height describes a rectangle in the gl render buffer 270 /* x,y,width,height describes a rectangle in the gl render buffer
267@@ -372,6 +378,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr, 271@@ -337,6 +343,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
268 int width, 272 int width,
269 int height) 273 int height)
270 { 274 {
@@ -272,7 +276,7 @@ index e8ba770..ba7c84b 100644
272 GdkGLContext *paint_context; 276 GdkGLContext *paint_context;
273 cairo_surface_t *image; 277 cairo_surface_t *image;
274 cairo_matrix_t matrix; 278 cairo_matrix_t matrix;
275@@ -692,6 +699,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr, 279@@ -706,6 +713,7 @@ out:
276 if (clip_region) 280 if (clip_region)
277 cairo_region_destroy (clip_region); 281 cairo_region_destroy (clip_region);
278 282
@@ -280,7 +284,7 @@ index e8ba770..ba7c84b 100644
280 } 284 }
281 285
282 /* This is always called with the paint context current */ 286 /* This is always called with the paint context current */
283@@ -699,6 +707,7 @@ void 287@@ -713,6 +721,7 @@ void
284 gdk_gl_texture_from_surface (cairo_surface_t *surface, 288 gdk_gl_texture_from_surface (cairo_surface_t *surface,
285 cairo_region_t *region) 289 cairo_region_t *region)
286 { 290 {
@@ -288,14 +292,14 @@ index e8ba770..ba7c84b 100644
288 GdkGLContext *paint_context; 292 GdkGLContext *paint_context;
289 cairo_surface_t *image; 293 cairo_surface_t *image;
290 double device_x_offset, device_y_offset; 294 double device_x_offset, device_y_offset;
291@@ -799,4 +808,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface, 295@@ -813,4 +822,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
292 296
293 glDisable (GL_SCISSOR_TEST); 297 glDisable (GL_SCISSOR_TEST);
294 glDeleteTextures (1, &texture_id); 298 glDeleteTextures (1, &texture_id);
295+#endif 299+#endif
296 } 300 }
297diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c 301diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
298index 00a33eb..bd8a793 100644 302index bf6e45f..d016e4b 100644
299--- a/gdk/gdkglcontext.c 303--- a/gdk/gdkglcontext.c
300+++ b/gdk/gdkglcontext.c 304+++ b/gdk/gdkglcontext.c
301@@ -85,7 +85,9 @@ 305@@ -85,7 +85,9 @@
@@ -308,23 +312,23 @@ index 00a33eb..bd8a793 100644
308 312
309 typedef struct { 313 typedef struct {
310 GdkDisplay *display; 314 GdkDisplay *display;
311@@ -239,6 +241,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, 315@@ -243,6 +243,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
312 int height, 316 int height,
313 guint texture_target) 317 guint texture_target)
314 { 318 {
315+#ifdef HAVE_OPENGL 319+#ifdef HAVE_OPENGL
316 g_return_if_fail (GDK_IS_GL_CONTEXT (context)); 320 GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
317 321
318 glPixelStorei (GL_UNPACK_ALIGNMENT, 4); 322 g_return_if_fail (GDK_IS_GL_CONTEXT (context));
319@@ -246,6 +249,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, 323@@ -286,6 +287,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
320 glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 324 glTexSubImage2D (texture_target, 0, 0, i, width, 1, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (unsigned char*) data + (i * stride));
321 cairo_image_surface_get_data (image_surface)); 325 }
322 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); 326 }
323+#endif 327+#endif
324 } 328 }
325 329
326 static void 330 static gboolean
327@@ -635,6 +639,7 @@ gdk_gl_context_realize (GdkGLContext *context, 331@@ -760,6 +764,7 @@ gdk_gl_context_realize (GdkGLContext *context,
328 static void 332 static void
329 gdk_gl_context_check_extensions (GdkGLContext *context) 333 gdk_gl_context_check_extensions (GdkGLContext *context)
330 { 334 {
@@ -332,7 +336,7 @@ index 00a33eb..bd8a793 100644
332 GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); 336 GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
333 gboolean has_npot, has_texture_rectangle; 337 gboolean has_npot, has_texture_rectangle;
334 338
335@@ -677,6 +682,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context) 339@@ -824,6 +829,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
336 priv->use_texture_rectangle ? "yes" : "no")); 340 priv->use_texture_rectangle ? "yes" : "no"));
337 341
338 priv->extensions_checked = TRUE; 342 priv->extensions_checked = TRUE;
@@ -341,10 +345,10 @@ index 00a33eb..bd8a793 100644
341 345
342 /** 346 /**
343diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c 347diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
344index 66ebb9d..74a0c3a 100644 348index 514732d..0e4fc7e 100644
345--- a/gdk/gdkwindow.c 349--- a/gdk/gdkwindow.c
346+++ b/gdk/gdkwindow.c 350+++ b/gdk/gdkwindow.c
347@@ -44,7 +44,9 @@ 351@@ -45,7 +45,9 @@
348 352
349 #include <math.h> 353 #include <math.h>
350 354
@@ -354,7 +358,7 @@ index 66ebb9d..74a0c3a 100644
354 358
355 /* for the use of round() */ 359 /* for the use of round() */
356 #include "fallback-c89.c" 360 #include "fallback-c89.c"
357@@ -2759,6 +2761,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window, 361@@ -2801,6 +2803,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
358 { 362 {
359 GError *internal_error = NULL; 363 GError *internal_error = NULL;
360 364
@@ -368,7 +372,7 @@ index 66ebb9d..74a0c3a 100644
368 if (_gdk_gl_flags & GDK_GL_DISABLE) 372 if (_gdk_gl_flags & GDK_GL_DISABLE)
369 { 373 {
370 g_set_error_literal (error, GDK_GL_ERROR, 374 g_set_error_literal (error, GDK_GL_ERROR,
371@@ -2955,6 +2964,7 @@ gdk_window_begin_paint_region (GdkWindow *window, 375@@ -2936,6 +2945,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
372 } 376 }
373 else 377 else
374 { 378 {
@@ -376,7 +380,7 @@ index 66ebb9d..74a0c3a 100644
376 gdk_gl_context_make_current (context); 380 gdk_gl_context_make_current (context);
377 /* With gl we always need a surface to combine the gl 381 /* With gl we always need a surface to combine the gl
378 drawing with the native drawing. */ 382 drawing with the native drawing. */
379@@ -2969,6 +2979,7 @@ gdk_window_begin_paint_region (GdkWindow *window, 383@@ -2950,6 +2960,7 @@ gdk_window_begin_paint_internal (GdkWindow *window,
380 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 384 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
381 385
382 glViewport (0, 0, ww, wh); 386 glViewport (0, 0, ww, wh);
@@ -384,7 +388,7 @@ index 66ebb9d..74a0c3a 100644
384 } 388 }
385 } 389 }
386 390
387@@ -3117,6 +3128,7 @@ gdk_window_end_paint (GdkWindow *window) 391@@ -3013,6 +3024,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
388 392
389 gdk_gl_context_make_current (window->gl_paint_context); 393 gdk_gl_context_make_current (window->gl_paint_context);
390 394
@@ -392,7 +396,7 @@ index 66ebb9d..74a0c3a 100644
392 if (!cairo_region_is_empty (opaque_region)) 396 if (!cairo_region_is_empty (opaque_region))
393 gdk_gl_texture_from_surface (window->current_paint.surface, 397 gdk_gl_texture_from_surface (window->current_paint.surface,
394 opaque_region); 398 opaque_region);
395@@ -3127,6 +3139,7 @@ gdk_window_end_paint (GdkWindow *window) 399@@ -3023,6 +3035,7 @@ gdk_window_end_paint_internal (GdkWindow *window)
396 window->current_paint.need_blend_region); 400 window->current_paint.need_blend_region);
397 glDisable(GL_BLEND); 401 glDisable(GL_BLEND);
398 } 402 }
@@ -401,10 +405,10 @@ index 66ebb9d..74a0c3a 100644
401 cairo_region_destroy (opaque_region); 405 cairo_region_destroy (opaque_region);
402 406
403diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am 407diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
404index c488a31..4ce3c07 100644 408index 6289f3a..cbbac79 100644
405--- a/gdk/x11/Makefile.am 409--- a/gdk/x11/Makefile.am
406+++ b/gdk/x11/Makefile.am 410+++ b/gdk/x11/Makefile.am
407@@ -39,8 +39,6 @@ libgdk_x11_la_SOURCES = \ 411@@ -40,8 +40,6 @@ libgdk_x11_la_SOURCES = \
408 gdkeventtranslator.c \ 412 gdkeventtranslator.c \
409 gdkeventtranslator.h \ 413 gdkeventtranslator.h \
410 gdkgeometry-x11.c \ 414 gdkgeometry-x11.c \
@@ -412,8 +416,8 @@ index c488a31..4ce3c07 100644
412- gdkglcontext-x11.h \ 416- gdkglcontext-x11.h \
413 gdkkeys-x11.c \ 417 gdkkeys-x11.c \
414 gdkmain-x11.c \ 418 gdkmain-x11.c \
415 gdkproperty-x11.c \ 419 gdkmonitor-x11.c \
416@@ -53,14 +51,32 @@ libgdk_x11_la_SOURCES = \ 420@@ -56,14 +54,32 @@ libgdk_x11_la_SOURCES = \
417 gdkwindow-x11.h \ 421 gdkwindow-x11.h \
418 gdkxftdefaults.c \ 422 gdkxftdefaults.c \
419 gdkxid.c \ 423 gdkxid.c \
@@ -447,15 +451,15 @@ index c488a31..4ce3c07 100644
447 libgdkx11include_HEADERS = \ 451 libgdkx11include_HEADERS = \
448 gdkx-autocleanups.h \ 452 gdkx-autocleanups.h \
449 gdkx11applaunchcontext.h \ 453 gdkx11applaunchcontext.h \
450@@ -74,7 +90,6 @@ libgdkx11include_HEADERS = \ 454@@ -77,7 +93,6 @@ libgdkx11include_HEADERS = \
451 gdkx11display.h \ 455 gdkx11display.h \
452 gdkx11displaymanager.h \ 456 gdkx11displaymanager.h \
453 gdkx11dnd.h \ 457 gdkx11dnd.h \
454- gdkx11glcontext.h \ 458- gdkx11glcontext.h \
455 gdkx11keys.h \ 459 gdkx11keys.h \
460 gdkx11monitor.h \
456 gdkx11property.h \ 461 gdkx11property.h \
457 gdkx11screen.h \ 462@@ -87,9 +102,16 @@ libgdkx11include_HEADERS = \
458@@ -83,9 +98,16 @@ libgdkx11include_HEADERS = \
459 gdkx11visual.h \ 463 gdkx11visual.h \
460 gdkx11window.h 464 gdkx11window.h
461 465
@@ -473,7 +477,7 @@ index c488a31..4ce3c07 100644
473+ 477+
474 -include $(top_srcdir)/git.mk 478 -include $(top_srcdir)/git.mk
475diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c 479diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
476index de91c64..42d50f6 100644 480index ad65e29..91345ee 100644
477--- a/gdk/x11/gdkdisplay-x11.c 481--- a/gdk/x11/gdkdisplay-x11.c
478+++ b/gdk/x11/gdkdisplay-x11.c 482+++ b/gdk/x11/gdkdisplay-x11.c
479@@ -37,7 +37,9 @@ 483@@ -37,7 +37,9 @@
@@ -486,7 +490,7 @@ index de91c64..42d50f6 100644
486 #include "gdk-private.h" 490 #include "gdk-private.h"
487 491
488 #include <glib.h> 492 #include <glib.h>
489@@ -2959,7 +2961,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) 493@@ -2994,7 +2996,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
490 display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list; 494 display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
491 display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target; 495 display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
492 496
@@ -498,10 +502,10 @@ index de91c64..42d50f6 100644
498 display_class->get_default_seat = gdk_x11_display_get_default_seat; 502 display_class->get_default_seat = gdk_x11_display_get_default_seat;
499 503
500diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c 504diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
501index 9d8ed20..bd46b00 100644 505index 450872d..f8a2f6e 100644
502--- a/gdk/x11/gdkscreen-x11.c 506--- a/gdk/x11/gdkscreen-x11.c
503+++ b/gdk/x11/gdkscreen-x11.c 507+++ b/gdk/x11/gdkscreen-x11.c
504@@ -1968,3 +1968,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen) 508@@ -1642,3 +1642,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen)
505 { 509 {
506 return get_netwm_cardinal_property (screen, "_NET_CURRENT_DESKTOP"); 510 return get_netwm_cardinal_property (screen, "_NET_CURRENT_DESKTOP");
507 } 511 }
@@ -511,7 +515,7 @@ index 9d8ed20..bd46b00 100644
511+void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {} 515+void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {}
512+#endif 516+#endif
513diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c 517diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
514index 9ed087a..30d6eb7 100644 518index fe311a7..d16bdfe 100644
515--- a/gdk/x11/gdkwindow-x11.c 519--- a/gdk/x11/gdkwindow-x11.c
516+++ b/gdk/x11/gdkwindow-x11.c 520+++ b/gdk/x11/gdkwindow-x11.c
517@@ -36,7 +36,9 @@ 521@@ -36,7 +36,9 @@
@@ -524,7 +528,7 @@ index 9ed087a..30d6eb7 100644
524 #include "gdkprivate-x11.h" 528 #include "gdkprivate-x11.h"
525 #include "gdk-private.h" 529 #include "gdk-private.h"
526 530
527@@ -5782,7 +5784,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass) 531@@ -5781,7 +5783,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
528 impl_class->set_opaque_region = gdk_x11_window_set_opaque_region; 532 impl_class->set_opaque_region = gdk_x11_window_set_opaque_region;
529 impl_class->set_shadow_width = gdk_x11_window_set_shadow_width; 533 impl_class->set_shadow_width = gdk_x11_window_set_shadow_width;
530 impl_class->show_window_menu = gdk_x11_window_show_window_menu; 534 impl_class->show_window_menu = gdk_x11_window_show_window_menu;
@@ -548,71 +552,21 @@ index edb0ea7..a317d61 100644
548 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref) 552 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
549 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref) 553 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
550 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref) 554 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
551diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h 555diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h
552new file mode 100644 556similarity index 98%
553index 0000000..ae05fa6 557rename from gdk/x11/gdkx.h
554--- /dev/null 558rename to gdk/x11/gdkx-with-gl-context.h
559index 1f64bcc..ae05fa6 100644
560--- a/gdk/x11/gdkx.h
555+++ b/gdk/x11/gdkx-with-gl-context.h 561+++ b/gdk/x11/gdkx-with-gl-context.h
556@@ -0,0 +1,59 @@ 562@@ -45,7 +45,6 @@
557+/* GDK - The GIMP Drawing Kit 563 #include <gdk/x11/gdkx11dnd.h>
558+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 564 #include <gdk/x11/gdkx11glcontext.h>
559+ * 565 #include <gdk/x11/gdkx11keys.h>
560+ * This library is free software; you can redistribute it and/or 566-#include <gdk/x11/gdkx11monitor.h>
561+ * modify it under the terms of the GNU Lesser General Public 567 #include <gdk/x11/gdkx11property.h>
562+ * License as published by the Free Software Foundation; either 568 #include <gdk/x11/gdkx11screen.h>
563+ * version 2 of the License, or (at your option) any later version. 569 #include <gdk/x11/gdkx11selection.h>
564+ *
565+ * This library is distributed in the hope that it will be useful,
566+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
567+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
568+ * Lesser General Public License for more details.
569+ *
570+ * You should have received a copy of the GNU Lesser General Public
571+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
572+ */
573+
574+/*
575+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
576+ * file for a list of people on the GTK+ Team. See the ChangeLog
577+ * files for a list of changes. These files are distributed with
578+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
579+ */
580+
581+#ifndef __GDK_X_H__
582+#define __GDK_X_H__
583+
584+#include <gdk/gdk.h>
585+
586+#include <X11/Xlib.h>
587+#include <X11/Xutil.h>
588+
589+#define __GDKX_H_INSIDE__
590+
591+#include <gdk/x11/gdkx11applaunchcontext.h>
592+#include <gdk/x11/gdkx11cursor.h>
593+#include <gdk/x11/gdkx11device.h>
594+#include <gdk/x11/gdkx11device-core.h>
595+#include <gdk/x11/gdkx11device-xi2.h>
596+#include <gdk/x11/gdkx11devicemanager.h>
597+#include <gdk/x11/gdkx11devicemanager-core.h>
598+#include <gdk/x11/gdkx11devicemanager-xi2.h>
599+#include <gdk/x11/gdkx11display.h>
600+#include <gdk/x11/gdkx11displaymanager.h>
601+#include <gdk/x11/gdkx11dnd.h>
602+#include <gdk/x11/gdkx11glcontext.h>
603+#include <gdk/x11/gdkx11keys.h>
604+#include <gdk/x11/gdkx11property.h>
605+#include <gdk/x11/gdkx11screen.h>
606+#include <gdk/x11/gdkx11selection.h>
607+#include <gdk/x11/gdkx11utils.h>
608+#include <gdk/x11/gdkx11visual.h>
609+#include <gdk/x11/gdkx11window.h>
610+
611+#include <gdk/x11/gdkx-autocleanups.h>
612+
613+#undef __GDKX_H_INSIDE__
614+
615+#endif /* __GDK_X_H__ */
616diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h 570diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
617new file mode 100644 571new file mode 100644
618index 0000000..c9e2617 572index 0000000..c9e2617
@@ -677,76 +631,11 @@ index 0000000..c9e2617
677+#undef __GDKX_H_INSIDE__ 631+#undef __GDKX_H_INSIDE__
678+ 632+
679+#endif /* __GDK_X_H__ */ 633+#endif /* __GDK_X_H__ */
680diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
681deleted file mode 100644
682index ae05fa6..0000000
683--- a/gdk/x11/gdkx.h
684+++ /dev/null
685@@ -1,59 +0,0 @@
686-/* GDK - The GIMP Drawing Kit
687- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
688- *
689- * This library is free software; you can redistribute it and/or
690- * modify it under the terms of the GNU Lesser General Public
691- * License as published by the Free Software Foundation; either
692- * version 2 of the License, or (at your option) any later version.
693- *
694- * This library is distributed in the hope that it will be useful,
695- * but WITHOUT ANY WARRANTY; without even the implied warranty of
696- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
697- * Lesser General Public License for more details.
698- *
699- * You should have received a copy of the GNU Lesser General Public
700- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
701- */
702-
703-/*
704- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
705- * file for a list of people on the GTK+ Team. See the ChangeLog
706- * files for a list of changes. These files are distributed with
707- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
708- */
709-
710-#ifndef __GDK_X_H__
711-#define __GDK_X_H__
712-
713-#include <gdk/gdk.h>
714-
715-#include <X11/Xlib.h>
716-#include <X11/Xutil.h>
717-
718-#define __GDKX_H_INSIDE__
719-
720-#include <gdk/x11/gdkx11applaunchcontext.h>
721-#include <gdk/x11/gdkx11cursor.h>
722-#include <gdk/x11/gdkx11device.h>
723-#include <gdk/x11/gdkx11device-core.h>
724-#include <gdk/x11/gdkx11device-xi2.h>
725-#include <gdk/x11/gdkx11devicemanager.h>
726-#include <gdk/x11/gdkx11devicemanager-core.h>
727-#include <gdk/x11/gdkx11devicemanager-xi2.h>
728-#include <gdk/x11/gdkx11display.h>
729-#include <gdk/x11/gdkx11displaymanager.h>
730-#include <gdk/x11/gdkx11dnd.h>
731-#include <gdk/x11/gdkx11glcontext.h>
732-#include <gdk/x11/gdkx11keys.h>
733-#include <gdk/x11/gdkx11property.h>
734-#include <gdk/x11/gdkx11screen.h>
735-#include <gdk/x11/gdkx11selection.h>
736-#include <gdk/x11/gdkx11utils.h>
737-#include <gdk/x11/gdkx11visual.h>
738-#include <gdk/x11/gdkx11window.h>
739-
740-#include <gdk/x11/gdkx-autocleanups.h>
741-
742-#undef __GDKX_H_INSIDE__
743-
744-#endif /* __GDK_X_H__ */
745diff --git a/gtk/Makefile.am b/gtk/Makefile.am 634diff --git a/gtk/Makefile.am b/gtk/Makefile.am
746index 6a53a2b..49a35e6 100644 635index 3b76b82..eb4a065 100644
747--- a/gtk/Makefile.am 636--- a/gtk/Makefile.am
748+++ b/gtk/Makefile.am 637+++ b/gtk/Makefile.am
749@@ -1351,14 +1351,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins. 638@@ -1378,14 +1378,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
750 && cp xgen-gptbc gtkprivatetypebuiltins.c \ 639 && cp xgen-gptbc gtkprivatetypebuiltins.c \
751 && rm -f xgen-gptbc 640 && rm -f xgen-gptbc
752 641
@@ -763,7 +652,7 @@ index 6a53a2b..49a35e6 100644
763 gtktestutils.c: gtktypefuncs.c 652 gtktestutils.c: gtktypefuncs.c
764 653
765diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c 654diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
766index 245fc6b..4214ad1 100644 655index 094378e..f7c7f47 100644
767--- a/gtk/gtkglarea.c 656--- a/gtk/gtkglarea.c
768+++ b/gtk/gtkglarea.c 657+++ b/gtk/gtkglarea.c
769@@ -28,7 +28,9 @@ 658@@ -28,7 +28,9 @@
@@ -776,7 +665,7 @@ index 245fc6b..4214ad1 100644
776 665
777 /** 666 /**
778 * SECTION:gtkglarea 667 * SECTION:gtkglarea
779@@ -357,9 +359,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area) 668@@ -368,9 +370,12 @@ gtk_gl_area_real_create_context (GtkGLArea *area)
780 static void 669 static void
781 gtk_gl_area_resize (GtkGLArea *area, int width, int height) 670 gtk_gl_area_resize (GtkGLArea *area, int width, int height)
782 { 671 {
@@ -789,7 +678,7 @@ index 245fc6b..4214ad1 100644
789 /* 678 /*
790 * Creates all the buffer objects needed for rendering the scene 679 * Creates all the buffer objects needed for rendering the scene
791 */ 680 */
792@@ -467,6 +472,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area) 681@@ -482,6 +487,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
793 682
794 priv->needs_render = TRUE; 683 priv->needs_render = TRUE;
795 } 684 }
@@ -797,7 +686,7 @@ index 245fc6b..4214ad1 100644
797 686
798 /** 687 /**
799 * gtk_gl_area_attach_buffers: 688 * gtk_gl_area_attach_buffers:
800@@ -485,6 +491,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area) 689@@ -500,6 +506,7 @@ gtk_gl_area_allocate_buffers (GtkGLArea *area)
801 void 690 void
802 gtk_gl_area_attach_buffers (GtkGLArea *area) 691 gtk_gl_area_attach_buffers (GtkGLArea *area)
803 { 692 {
@@ -805,7 +694,7 @@ index 245fc6b..4214ad1 100644
805 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); 694 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
806 695
807 g_return_if_fail (GTK_IS_GL_AREA (area)); 696 g_return_if_fail (GTK_IS_GL_AREA (area));
808@@ -517,11 +524,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area) 697@@ -532,11 +539,13 @@ gtk_gl_area_attach_buffers (GtkGLArea *area)
809 glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT, 698 glFramebufferRenderbufferEXT (GL_FRAMEBUFFER_EXT, GL_STENCIL_ATTACHMENT_EXT,
810 GL_RENDERBUFFER_EXT, priv->depth_stencil_buffer); 699 GL_RENDERBUFFER_EXT, priv->depth_stencil_buffer);
811 } 700 }
@@ -819,7 +708,7 @@ index 245fc6b..4214ad1 100644
819 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); 708 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
820 709
821 if (priv->context == NULL) 710 if (priv->context == NULL)
822@@ -553,6 +562,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area) 711@@ -568,6 +577,7 @@ gtk_gl_area_delete_buffers (GtkGLArea *area)
823 glDeleteFramebuffersEXT (1, &priv->frame_buffer); 712 glDeleteFramebuffersEXT (1, &priv->frame_buffer);
824 priv->frame_buffer = 0; 713 priv->frame_buffer = 0;
825 } 714 }
@@ -827,7 +716,7 @@ index 245fc6b..4214ad1 100644
827 } 716 }
828 717
829 static void 718 static void
830@@ -663,6 +673,7 @@ gtk_gl_area_draw (GtkWidget *widget, 719@@ -678,6 +688,7 @@ gtk_gl_area_draw (GtkWidget *widget,
831 GtkGLArea *area = GTK_GL_AREA (widget); 720 GtkGLArea *area = GTK_GL_AREA (widget);
832 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area); 721 GtkGLAreaPrivate *priv = gtk_gl_area_get_instance_private (area);
833 gboolean unused; 722 gboolean unused;
@@ -835,7 +724,7 @@ index 245fc6b..4214ad1 100644
835 int w, h, scale; 724 int w, h, scale;
836 GLenum status; 725 GLenum status;
837 726
838@@ -674,7 +685,6 @@ gtk_gl_area_draw (GtkWidget *widget, 727@@ -689,7 +700,6 @@ gtk_gl_area_draw (GtkWidget *widget,
839 gtk_widget_get_allocated_height (widget)); 728 gtk_widget_get_allocated_height (widget));
840 return FALSE; 729 return FALSE;
841 } 730 }
@@ -843,7 +732,7 @@ index 245fc6b..4214ad1 100644
843 if (priv->context == NULL) 732 if (priv->context == NULL)
844 return FALSE; 733 return FALSE;
845 734
846@@ -720,6 +730,14 @@ gtk_gl_area_draw (GtkWidget *widget, 735@@ -735,6 +745,14 @@ gtk_gl_area_draw (GtkWidget *widget,
847 } 736 }
848 737
849 return TRUE; 738 return TRUE;
@@ -859,7 +748,7 @@ index 245fc6b..4214ad1 100644
859 748
860 static gboolean 749 static gboolean
861diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c 750diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
862index 4eab3a7..c4e900e 100644 751index 31dd6aa..1cedbd3 100644
863--- a/gtk/inspector/general.c 752--- a/gtk/inspector/general.c
864+++ b/gtk/inspector/general.c 753+++ b/gtk/inspector/general.c
865@@ -33,8 +33,10 @@ 754@@ -33,8 +33,10 @@
@@ -873,7 +762,7 @@ index 4eab3a7..c4e900e 100644
873 762
874 #ifdef GDK_WINDOWING_WIN32 763 #ifdef GDK_WINDOWING_WIN32
875 #include "win32/gdkwin32.h" 764 #include "win32/gdkwin32.h"
876@@ -147,6 +149,7 @@ append_extension_row (GtkInspectorGeneral *gen, 765@@ -196,6 +198,7 @@ add_label_row (GtkInspectorGeneral *gen,
877 gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label); 766 gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label);
878 } 767 }
879 768
@@ -881,15 +770,15 @@ index 4eab3a7..c4e900e 100644
881 #ifdef GDK_WINDOWING_X11 770 #ifdef GDK_WINDOWING_X11
882 static void 771 static void
883 append_glx_extension_row (GtkInspectorGeneral *gen, 772 append_glx_extension_row (GtkInspectorGeneral *gen,
884@@ -156,6 +159,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen, 773@@ -205,6 +208,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
885 append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext)); 774 add_check_row (gen, GTK_LIST_BOX (gen->priv->gl_box), ext, epoxy_has_glx_extension (dpy, 0, ext), 0);
886 } 775 }
887 #endif 776 #endif
888+#endif 777+#endif
889 778
890 #ifdef GDK_WINDOWING_WAYLAND 779 #ifdef GDK_WINDOWING_WAYLAND
891 static void 780 static void
892@@ -171,6 +175,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen, 781@@ -220,6 +224,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen,
893 static void 782 static void
894 init_gl (GtkInspectorGeneral *gen) 783 init_gl (GtkInspectorGeneral *gen)
895 { 784 {
@@ -897,7 +786,7 @@ index 4eab3a7..c4e900e 100644
897 #ifdef GDK_WINDOWING_X11 786 #ifdef GDK_WINDOWING_X11
898 if (GDK_IS_X11_DISPLAY (gdk_display_get_default ())) 787 if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
899 { 788 {
900@@ -197,6 +202,7 @@ init_gl (GtkInspectorGeneral *gen) 789@@ -246,6 +251,7 @@ init_gl (GtkInspectorGeneral *gen)
901 } 790 }
902 else 791 else
903 #endif 792 #endif
@@ -906,7 +795,7 @@ index 4eab3a7..c4e900e 100644
906 if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ())) 795 if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
907 { 796 {
908diff --git a/tests/Makefile.am b/tests/Makefile.am 797diff --git a/tests/Makefile.am b/tests/Makefile.am
909index 681807d..2941a36 100644 798index 649981f..a0e48a6 100644
910--- a/tests/Makefile.am 799--- a/tests/Makefile.am
911+++ b/tests/Makefile.am 800+++ b/tests/Makefile.am
912@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \ 801@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
@@ -918,19 +807,20 @@ index 681807d..2941a36 100644
918 testgrid \ 807 testgrid \
919 testgtk \ 808 testgtk \
920 testheaderbar \ 809 testheaderbar \
921@@ -169,11 +167,17 @@ noinst_PROGRAMS = $(TEST_PROGS) \ 810@@ -169,12 +167,18 @@ noinst_PROGRAMS = $(TEST_PROGS) \
922 testactionbar \ 811 testactionbar \
923 testwindowsize \ 812 testwindowsize \
924 testpopover \ 813 testpopover \
925- gdkgears \ 814- gdkgears \
926 listmodel \ 815 listmodel \
927 testpopup \ 816 testpopup \
817 testpopupat \
928 $(NULL) 818 $(NULL)
929 819
930+if HAVE_OPENGL 820+if HAVE_OPENGL
931+noinst_PROGRAMS += 821+noinst_PROGRAMS +=
932+ testglarea \ 822+ testglarea \
933+ testglblending \ 823+ testglblending \
934+ gdkgears 824+ gdkgears
935+endif 825+endif
936+ 826+
@@ -938,7 +828,7 @@ index 681807d..2941a36 100644
938 noinst_PROGRAMS += testerrors 828 noinst_PROGRAMS += testerrors
939 endif 829 endif
940diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c 830diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c
941index e0ebee0..703643c 100644 831index 0b3a519..07b096f 100644
942--- a/testsuite/gtk/objects-finalize.c 832--- a/testsuite/gtk/objects-finalize.c
943+++ b/testsuite/gtk/objects-finalize.c 833+++ b/testsuite/gtk/objects-finalize.c
944@@ -115,8 +115,10 @@ main (int argc, char **argv) 834@@ -115,8 +115,10 @@ main (int argc, char **argv)
@@ -951,4 +841,7 @@ index e0ebee0..703643c 100644
951+#endif 841+#endif
952 /* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */ 842 /* Not allowed to finalize a GdkPixbufLoader without calling gdk_pixbuf_loader_close() */
953 all_types[i] != GDK_TYPE_PIXBUF_LOADER && 843 all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
954 all_types[i] != gdk_pixbuf_simple_anim_iter_get_type()) 844 all_types[i] != GDK_TYPE_DRAWING_CONTEXT &&
845--
8462.1.4
847
diff --git a/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb b/meta/recipes-gnome/gtk+/gtk+3_3.22.1.bb
index 38e095ab9f..5fb0eddf96 100644
--- a/meta/recipes-gnome/gtk+/gtk+3_3.20.9.bb
+++ b/meta/recipes-gnome/gtk+/gtk+3_3.22.1.bb
@@ -7,10 +7,9 @@ SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/gtk+/${MAJ_VER}/gtk+-${PV}.tar
7 file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \ 7 file://0002-Do-not-try-to-initialize-GL-without-libGL.patch \
8 file://0003-Add-disable-opengl-configure-option.patch \ 8 file://0003-Add-disable-opengl-configure-option.patch \
9 file://0004-configure.ac-Fix-wayland-protocols-path.patch \ 9 file://0004-configure.ac-Fix-wayland-protocols-path.patch \
10 file://0001-Redo-focus-handling-in-treeview-once-more.patch \
11 " 10 "
12SRC_URI[md5sum] = "cc76cac5e18c772c6784bf19a3dff08b" 11SRC_URI[md5sum] = "ebfa5e52167f2b8a4ec6024d51d86f1f"
13SRC_URI[sha256sum] = "83a609ba2f3424b5509e73967c49c67833af466d6f91081b24ee5c64fce6ac17" 12SRC_URI[sha256sum] = "127c8c5cfc32681f9ab3cb542eb0d5c16c1c02faba68bf8fcac9a3cf278ef471"
14 13
15S = "${WORKDIR}/gtk+-${PV}" 14S = "${WORKDIR}/gtk+-${PV}"
16 15