summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome/gtk+/gtk+3
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-06-22 14:52:20 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-01 16:22:41 +0100
commit33226ae5b32067e483817b22d1f5563e5017d709 (patch)
tree420c8c4e0dc56885b18847c0bfa59fd8f98adb1e /meta/recipes-gnome/gtk+/gtk+3
parentef8bbc7869337b2ad4d833f1d3f2857589d15190 (diff)
downloadpoky-33226ae5b32067e483817b22d1f5563e5017d709.tar.gz
gtk+3: Upgrade 3.18.8 -> 3.20.6
* Remove a patch that's no longer needed (as we don't have a problem with client side decorations anymore) * Wayland build now depends on wayland-protocols: Use same WAYLAND_PROTOCOLS_SYSROOT_DIR trick as weston so protocols are found and multilib build does not break * Add new binary gtk-query-settings to -dev package * Rebase patches * Modify 0003-Add-disable-opengl-configure-option.patch so that gdkx.h really is generated whenever it changes * Depend on wayland-protocols in gtk+3-dev if Wayland is enabled as otherwise the pkg-config files can't be used - RB (From OE-Core rev: b610145b1aadb093ced72a7958d8df00ef1250b6) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> gtk+3: depend on wayland-protocols if wayland enabled Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome/gtk+/gtk+3')
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch (renamed from meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch)26
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch (renamed from meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch)12
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch (renamed from meta/recipes-gnome/gtk+/gtk+3/0001-Add-disable-opengl-configure-option.patch)327
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch36
-rw-r--r--meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch118
5 files changed, 158 insertions, 361 deletions
diff --git a/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch b/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
index 3b4beeb712..0bda1f1074 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0001-Hardcoded-libtool.patch
@@ -1,12 +1,21 @@
1From 5a73a5b92566e314bbc8a1bd40f1ec204837c111 Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Tue, 21 Jun 2016 14:53:56 +0300
4Subject: [PATCH 1/4] Hardcoded libtool
5
1Upstream-Status: Inappropriate [embedded specific] 6Upstream-Status: Inappropriate [embedded specific]
2 7
3Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> 8Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
9Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
10---
11 configure.ac | 6 +++---
12 1 file changed, 3 insertions(+), 3 deletions(-)
4 13
5Index: gtk+-3.8.2/configure.ac 14diff --git a/configure.ac b/configure.ac
6=================================================================== 15index 23d3077..b6931d6 100644
7--- gtk+-3.8.2.orig/configure.ac 16--- a/configure.ac
8+++ gtk+-3.8.2/configure.ac 17+++ b/configure.ac
9@@ -531,7 +531,7 @@ AC_MSG_CHECKING([Whether to write depend 18@@ -610,7 +610,7 @@ AC_MSG_CHECKING([whether to write dependencies into .pc files])
10 case $enable_explicit_deps in 19 case $enable_explicit_deps in
11 auto) 20 auto)
12 export SED 21 export SED
@@ -15,7 +24,7 @@ Index: gtk+-3.8.2/configure.ac
15 if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then 24 if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
16 enable_explicit_deps=yes 25 enable_explicit_deps=yes
17 else 26 else
18@@ -793,7 +793,7 @@ else 27@@ -876,7 +876,7 @@ else
19 dnl Now we check to see if our libtool supports shared lib deps 28 dnl Now we check to see if our libtool supports shared lib deps
20 dnl (in a rather ugly way even) 29 dnl (in a rather ugly way even)
21 if $dynworks; then 30 if $dynworks; then
@@ -24,7 +33,7 @@ Index: gtk+-3.8.2/configure.ac
24 module_deplibs_check=`$module_libtool_config | \ 33 module_deplibs_check=`$module_libtool_config | \
25 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \ 34 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
26 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'` 35 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
27@@ -1528,7 +1528,7 @@ fi 36@@ -1630,7 +1630,7 @@ AC_SUBST(GTK_PRINT_BACKENDS)
28 # We are using gmodule-no-export now, but I'm leaving the stripping 37 # We are using gmodule-no-export now, but I'm leaving the stripping
29 # code in place for now, since pango and atk still require gmodule. 38 # code in place for now, since pango and atk still require gmodule.
30 export SED 39 export SED
@@ -33,3 +42,6 @@ Index: gtk+-3.8.2/configure.ac
33 if test -n "$export_dynamic"; then 42 if test -n "$export_dynamic"; then
34 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"` 43 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
35 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"` 44 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
45--
462.1.4
47
diff --git a/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch b/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
index c8c480c5eb..989716e513 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch
+++ b/meta/recipes-gnome/gtk+/gtk+3/0002-Do-not-try-to-initialize-GL-without-libGL.patch
@@ -1,7 +1,7 @@
1From fc22058a10db913534f11348f86681fe9e1838e5 Mon Sep 17 00:00:00 2001 1From d63b926f8c8d8b5c9f9ec33d078b775f0409d88a Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Fri, 16 Oct 2015 16:35:16 +0300 3Date: Fri, 16 Oct 2015 16:35:16 +0300
4Subject: [PATCH] Do not try to initialize GL without libGL 4Subject: [PATCH 2/4] Do not try to initialize GL without libGL
5 5
6_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys 6_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys
7GLX api which will exit() if libGL.so.1 is not present. We do not 7GLX api which will exit() if libGL.so.1 is not present. We do not
@@ -21,10 +21,10 @@ Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
21 2 files changed, 12 insertions(+) 21 2 files changed, 12 insertions(+)
22 22
23diff --git a/configure.ac b/configure.ac 23diff --git a/configure.ac b/configure.ac
24index 729a62e..58cc1ac 100644 24index b6931d6..e27da49 100644
25--- a/configure.ac 25--- a/configure.ac
26+++ b/configure.ac 26+++ b/configure.ac
27@@ -328,6 +328,13 @@ AC_ARG_ENABLE(mir-backend, 27@@ -342,6 +342,13 @@ AC_ARG_ENABLE(mir-backend,
28 [enable the Mir gdk backend])], 28 [enable the Mir gdk backend])],
29 [backend_set=yes]) 29 [backend_set=yes])
30 30
@@ -39,10 +39,10 @@ index 729a62e..58cc1ac 100644
39 if test "$platform_win32" = yes; then 39 if test "$platform_win32" = yes; then
40 enable_win32_backend=yes 40 enable_win32_backend=yes
41diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c 41diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
42index f3b062d..c8243f4 100644 42index 81479d8..3c8c5c0 100644
43--- a/gdk/x11/gdkvisual-x11.c 43--- a/gdk/x11/gdkvisual-x11.c
44+++ b/gdk/x11/gdkvisual-x11.c 44+++ b/gdk/x11/gdkvisual-x11.c
45@@ -345,7 +345,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen) 45@@ -306,7 +306,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
46 /* If GL is available we want to pick better default/rgba visuals, 46 /* If GL is available we want to pick better default/rgba visuals,
47 as we care about glx details such as alpha/depth/stencil depth, 47 as we care about glx details such as alpha/depth/stencil depth,
48 stereo and double buffering */ 48 stereo and double buffering */
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0001-Add-disable-opengl-configure-option.patch b/meta/recipes-gnome/gtk+/gtk+3/0003-Add-disable-opengl-configure-option.patch
index a963334d94..8552f53e3e 100644
--- a/meta/recipes-gnome/gtk+/gtk+3/0001-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 c77afa19881d955d759879aeae8bbd88613dd4fe Mon Sep 17 00:00:00 2001 1From a8fa547fdc1416b330aced805f5343ad912932ae Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com> 2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Thu, 16 Jun 2016 15:11:34 +0300 3Date: Tue, 21 Jun 2016 15:11:39 +0300
4Subject: [PATCH] Add --disable-opengl configure option 4Subject: [PATCH 3/4] 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
@@ -20,37 +20,35 @@ Long-term it would be good to find an alternative solution to this
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 | 14 +++++++++- 30 gdk/gdkwindow.c | 13 +++++++
31 gdk/x11/Makefile.am | 28 ++++++++++++++++--- 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} | 0
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(+), 17 deletions(-)
44 21 files changed, 257 insertions(+), 78 deletions(-) 44 rename gdk/x11/{gdkx.h => gdkx-with-gl-context.h} (100%)
45 create mode 100644 gdk/x11/gdkx-with-gl-context.h
46 create mode 100644 gdk/x11/gdkx-without-gl-context.h 45 create mode 100644 gdk/x11/gdkx-without-gl-context.h
47 delete mode 100644 gdk/x11/gdkx.h
48 46
49diff --git a/configure.ac b/configure.ac 47diff --git a/configure.ac b/configure.ac
50index c280543..32da151 100644 48index e27da49..a3e9beb 100644
51--- a/configure.ac 49--- a/configure.ac
52+++ b/configure.ac 50+++ b/configure.ac
53@@ -340,6 +340,15 @@ AC_ARG_ENABLE(mir-backend, 51@@ -342,6 +342,15 @@ AC_ARG_ENABLE(mir-backend,
54 [enable the Mir gdk backend])], 52 [enable the Mir gdk backend])],
55 [backend_set=yes]) 53 [backend_set=yes])
56 54
@@ -66,7 +64,7 @@ index c280543..32da151 100644
66 AC_ARG_ENABLE(glx, 64 AC_ARG_ENABLE(glx,
67 [AS_HELP_STRING([--enable-glx], 65 [AS_HELP_STRING([--enable-glx],
68 [When enabled Gdk will try to initialize GLX])]) 66 [When enabled Gdk will try to initialize GLX])])
69@@ -1330,7 +1339,7 @@ CFLAGS="$saved_cflags" 67@@ -1333,7 +1342,7 @@ CFLAGS="$saved_cflags"
70 LDFLAGS="$saved_ldflags" 68 LDFLAGS="$saved_ldflags"
71 69
72 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"
@@ -75,7 +73,7 @@ index c280543..32da151 100644
75 73
76 PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES) 74 PKG_CHECK_MODULES(GDK_DEP, $GDK_PACKAGES $GDK_PRIVATE_PACKAGES)
77 GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB" 75 GDK_DEP_LIBS="$GDK_EXTRA_LIBS $GDK_DEP_LIBS $MATH_LIB"
78@@ -1364,7 +1373,7 @@ fi 76@@ -1367,7 +1376,7 @@ fi
79 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES) 77 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
80 78
81 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"
@@ -85,7 +83,7 @@ index c280543..32da151 100644
85 GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2" 83 GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
86 fi 84 fi
87diff --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
88index c267706..b3bac86 100644 86index 3aba729..c6c79f7 100644
89--- a/demos/gtk-demo/glarea.c 87--- a/demos/gtk-demo/glarea.c
90+++ b/demos/gtk-demo/glarea.c 88+++ b/demos/gtk-demo/glarea.c
91@@ -5,7 +5,9 @@ 89@@ -5,7 +5,9 @@
@@ -207,10 +205,10 @@ index 932daf1..54239d6 100644
207 205
208 return info; 206 return info;
209diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c 207diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
210index 892d6a7..8323768 100644 208index 6150ef7..2223629 100644
211--- a/gdk/gdkdisplay.c 209--- a/gdk/gdkdisplay.c
212+++ b/gdk/gdkdisplay.c 210+++ b/gdk/gdkdisplay.c
213@@ -2285,7 +2285,9 @@ gboolean 211@@ -2360,7 +2360,9 @@ gboolean
214 gdk_display_make_gl_context_current (GdkDisplay *display, 212 gdk_display_make_gl_context_current (GdkDisplay *display,
215 GdkGLContext *context) 213 GdkGLContext *context)
216 { 214 {
@@ -222,7 +220,7 @@ index 892d6a7..8323768 100644
222 220
223 GdkRenderingMode 221 GdkRenderingMode
224diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c 222diff --git a/gdk/gdkgl.c b/gdk/gdkgl.c
225index 85ce63d..d76e8dc 100644 223index e8ba770..ba7c84b 100644
226--- a/gdk/gdkgl.c 224--- a/gdk/gdkgl.c
227+++ b/gdk/gdkgl.c 225+++ b/gdk/gdkgl.c
228@@ -22,7 +22,9 @@ 226@@ -22,7 +22,9 @@
@@ -243,7 +241,7 @@ index 85ce63d..d76e8dc 100644
243 static const char * 241 static const char *
244 get_vertex_type_name (int type) 242 get_vertex_type_name (int type)
245 { 243 {
246@@ -205,6 +208,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data) 244@@ -254,6 +257,7 @@ use_texture_rect_program (GdkGLContextPaintData *paint_data)
247 glUseProgram (paint_data->current_program->program); 245 glUseProgram (paint_data->current_program->program);
248 } 246 }
249 } 247 }
@@ -251,7 +249,7 @@ index 85ce63d..d76e8dc 100644
251 249
252 void 250 void
253 gdk_gl_texture_quads (GdkGLContext *paint_context, 251 gdk_gl_texture_quads (GdkGLContext *paint_context,
254@@ -212,6 +216,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, 252@@ -261,6 +265,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
255 int n_quads, 253 int n_quads,
256 GdkTexturedQuad *quads) 254 GdkTexturedQuad *quads)
257 { 255 {
@@ -259,7 +257,7 @@ index 85ce63d..d76e8dc 100644
259 GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context); 257 GdkGLContextPaintData *paint_data = gdk_gl_context_get_paint_data (paint_context);
260 GdkGLContextProgram *program; 258 GdkGLContextProgram *program;
261 GdkWindow *window = gdk_gl_context_get_window (paint_context); 259 GdkWindow *window = gdk_gl_context_get_window (paint_context);
262@@ -275,6 +280,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context, 260@@ -324,6 +329,7 @@ gdk_gl_texture_quads (GdkGLContext *paint_context,
263 261
264 glDisableVertexAttribArray (program->position_location); 262 glDisableVertexAttribArray (program->position_location);
265 glDisableVertexAttribArray (program->uv_location); 263 glDisableVertexAttribArray (program->uv_location);
@@ -267,7 +265,7 @@ index 85ce63d..d76e8dc 100644
267 } 265 }
268 266
269 /* x,y,width,height describes a rectangle in the gl render buffer 267 /* x,y,width,height describes a rectangle in the gl render buffer
270@@ -323,6 +329,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr, 268@@ -372,6 +378,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
271 int width, 269 int width,
272 int height) 270 int height)
273 { 271 {
@@ -275,7 +273,7 @@ index 85ce63d..d76e8dc 100644
275 GdkGLContext *paint_context; 273 GdkGLContext *paint_context;
276 cairo_surface_t *image; 274 cairo_surface_t *image;
277 cairo_matrix_t matrix; 275 cairo_matrix_t matrix;
278@@ -643,6 +650,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr, 276@@ -692,6 +699,7 @@ gdk_cairo_draw_from_gl (cairo_t *cr,
279 if (clip_region) 277 if (clip_region)
280 cairo_region_destroy (clip_region); 278 cairo_region_destroy (clip_region);
281 279
@@ -283,7 +281,7 @@ index 85ce63d..d76e8dc 100644
283 } 281 }
284 282
285 /* This is always called with the paint context current */ 283 /* This is always called with the paint context current */
286@@ -650,6 +658,7 @@ void 284@@ -699,6 +707,7 @@ void
287 gdk_gl_texture_from_surface (cairo_surface_t *surface, 285 gdk_gl_texture_from_surface (cairo_surface_t *surface,
288 cairo_region_t *region) 286 cairo_region_t *region)
289 { 287 {
@@ -291,14 +289,14 @@ index 85ce63d..d76e8dc 100644
291 GdkGLContext *paint_context; 289 GdkGLContext *paint_context;
292 cairo_surface_t *image; 290 cairo_surface_t *image;
293 double device_x_offset, device_y_offset; 291 double device_x_offset, device_y_offset;
294@@ -750,4 +759,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface, 292@@ -799,4 +808,5 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
295 293
296 glDisable (GL_SCISSOR_TEST); 294 glDisable (GL_SCISSOR_TEST);
297 glDeleteTextures (1, &texture_id); 295 glDeleteTextures (1, &texture_id);
298+#endif 296+#endif
299 } 297 }
300diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c 298diff --git a/gdk/gdkglcontext.c b/gdk/gdkglcontext.c
301index 4d71353..9bb55ef 100644 299index 00a33eb..bd8a793 100644
302--- a/gdk/gdkglcontext.c 300--- a/gdk/gdkglcontext.c
303+++ b/gdk/gdkglcontext.c 301+++ b/gdk/gdkglcontext.c
304@@ -85,7 +85,9 @@ 302@@ -85,7 +85,9 @@
@@ -311,7 +309,7 @@ index 4d71353..9bb55ef 100644
311 309
312 typedef struct { 310 typedef struct {
313 GdkDisplay *display; 311 GdkDisplay *display;
314@@ -238,6 +240,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, 312@@ -239,6 +241,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
315 int height, 313 int height,
316 guint texture_target) 314 guint texture_target)
317 { 315 {
@@ -319,7 +317,7 @@ index 4d71353..9bb55ef 100644
319 g_return_if_fail (GDK_IS_GL_CONTEXT (context)); 317 g_return_if_fail (GDK_IS_GL_CONTEXT (context));
320 318
321 glPixelStorei (GL_UNPACK_ALIGNMENT, 4); 319 glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
322@@ -245,6 +248,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context, 320@@ -246,6 +249,7 @@ gdk_gl_context_upload_texture (GdkGLContext *context,
323 glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 321 glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV,
324 cairo_image_surface_get_data (image_surface)); 322 cairo_image_surface_get_data (image_surface));
325 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0); 323 glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
@@ -327,7 +325,7 @@ index 4d71353..9bb55ef 100644
327 } 325 }
328 326
329 static void 327 static void
330@@ -586,6 +590,7 @@ gdk_gl_context_realize (GdkGLContext *context, 328@@ -635,6 +639,7 @@ gdk_gl_context_realize (GdkGLContext *context,
331 static void 329 static void
332 gdk_gl_context_check_extensions (GdkGLContext *context) 330 gdk_gl_context_check_extensions (GdkGLContext *context)
333 { 331 {
@@ -335,8 +333,8 @@ index 4d71353..9bb55ef 100644
335 GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context); 333 GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
336 gboolean has_npot, has_texture_rectangle; 334 gboolean has_npot, has_texture_rectangle;
337 335
338@@ -628,6 +633,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context) 336@@ -677,6 +682,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
339 priv->use_texture_rectangle ? "yes" : "no")); 337 priv->use_texture_rectangle ? "yes" : "no"));
340 338
341 priv->extensions_checked = TRUE; 339 priv->extensions_checked = TRUE;
342+#endif 340+#endif
@@ -344,7 +342,7 @@ index 4d71353..9bb55ef 100644
344 342
345 /** 343 /**
346diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c 344diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
347index c34c113..3025e96 100644 345index 66ebb9d..74a0c3a 100644
348--- a/gdk/gdkwindow.c 346--- a/gdk/gdkwindow.c
349+++ b/gdk/gdkwindow.c 347+++ b/gdk/gdkwindow.c
350@@ -44,7 +44,9 @@ 348@@ -44,7 +44,9 @@
@@ -357,15 +355,7 @@ index c34c113..3025e96 100644
357 355
358 /* for the use of round() */ 356 /* for the use of round() */
359 #include "fallback-c89.c" 357 #include "fallback-c89.c"
360@@ -1455,7 +1457,6 @@ gdk_window_new (GdkWindow *parent, 358@@ -2759,6 +2761,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
361 g_signal_connect (device_manager, "device-removed",
362 G_CALLBACK (device_removed_cb), window);
363
364-
365 if ((_gdk_gl_flags & (GDK_GL_ALWAYS | GDK_GL_DISABLE)) == GDK_GL_ALWAYS)
366 {
367 GError *error = NULL;
368@@ -2761,6 +2762,13 @@ gdk_window_get_paint_gl_context (GdkWindow *window,
369 { 359 {
370 GError *internal_error = NULL; 360 GError *internal_error = NULL;
371 361
@@ -379,7 +369,7 @@ index c34c113..3025e96 100644
379 if (_gdk_gl_flags & GDK_GL_DISABLE) 369 if (_gdk_gl_flags & GDK_GL_DISABLE)
380 { 370 {
381 g_set_error_literal (error, GDK_GL_ERROR, 371 g_set_error_literal (error, GDK_GL_ERROR,
382@@ -2957,6 +2965,7 @@ gdk_window_begin_paint_region (GdkWindow *window, 372@@ -2955,6 +2964,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
383 } 373 }
384 else 374 else
385 { 375 {
@@ -387,7 +377,7 @@ index c34c113..3025e96 100644
387 gdk_gl_context_make_current (context); 377 gdk_gl_context_make_current (context);
388 /* With gl we always need a surface to combine the gl 378 /* With gl we always need a surface to combine the gl
389 drawing with the native drawing. */ 379 drawing with the native drawing. */
390@@ -2971,6 +2980,7 @@ gdk_window_begin_paint_region (GdkWindow *window, 380@@ -2969,6 +2979,7 @@ gdk_window_begin_paint_region (GdkWindow *window,
391 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA); 381 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
392 382
393 glViewport (0, 0, ww, wh); 383 glViewport (0, 0, ww, wh);
@@ -395,7 +385,7 @@ index c34c113..3025e96 100644
395 } 385 }
396 } 386 }
397 387
398@@ -3119,6 +3129,7 @@ gdk_window_end_paint (GdkWindow *window) 388@@ -3117,6 +3128,7 @@ gdk_window_end_paint (GdkWindow *window)
399 389
400 gdk_gl_context_make_current (window->gl_paint_context); 390 gdk_gl_context_make_current (window->gl_paint_context);
401 391
@@ -403,7 +393,7 @@ index c34c113..3025e96 100644
403 if (!cairo_region_is_empty (opaque_region)) 393 if (!cairo_region_is_empty (opaque_region))
404 gdk_gl_texture_from_surface (window->current_paint.surface, 394 gdk_gl_texture_from_surface (window->current_paint.surface,
405 opaque_region); 395 opaque_region);
406@@ -3129,6 +3140,7 @@ gdk_window_end_paint (GdkWindow *window) 396@@ -3127,6 +3139,7 @@ gdk_window_end_paint (GdkWindow *window)
407 window->current_paint.need_blend_region); 397 window->current_paint.need_blend_region);
408 glDisable(GL_BLEND); 398 glDisable(GL_BLEND);
409 } 399 }
@@ -412,7 +402,7 @@ index c34c113..3025e96 100644
412 cairo_region_destroy (opaque_region); 402 cairo_region_destroy (opaque_region);
413 403
414diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am 404diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
415index c488a31..d0aa7ce 100644 405index c488a31..4ce3c07 100644
416--- a/gdk/x11/Makefile.am 406--- a/gdk/x11/Makefile.am
417+++ b/gdk/x11/Makefile.am 407+++ b/gdk/x11/Makefile.am
418@@ -39,8 +39,6 @@ libgdk_x11_la_SOURCES = \ 408@@ -39,8 +39,6 @@ libgdk_x11_la_SOURCES = \
@@ -424,7 +414,7 @@ index c488a31..d0aa7ce 100644
424 gdkkeys-x11.c \ 414 gdkkeys-x11.c \
425 gdkmain-x11.c \ 415 gdkmain-x11.c \
426 gdkproperty-x11.c \ 416 gdkproperty-x11.c \
427@@ -53,14 +51,30 @@ libgdk_x11_la_SOURCES = \ 417@@ -53,14 +51,32 @@ libgdk_x11_la_SOURCES = \
428 gdkwindow-x11.h \ 418 gdkwindow-x11.h \
429 gdkxftdefaults.c \ 419 gdkxftdefaults.c \
430 gdkxid.c \ 420 gdkxid.c \
@@ -450,13 +440,15 @@ index c488a31..d0aa7ce 100644
450+ 440+
451+BUILT_SOURCES = gdkx.h 441+BUILT_SOURCES = gdkx.h
452+ 442+
443+.PHONY: gdkx.h
453+gdkx.h: 444+gdkx.h:
454+ $(AM_V_GEN) cd $(srcdir) && cp $(GDKX_HEADER) gdkx.h 445+ $(AM_V_GEN) cd $(srcdir) \
446+ && (cmp -s $(GDKX_HEADER) gdkx.h || cp $(GDKX_HEADER) gdkx.h )
455+ 447+
456 libgdkx11include_HEADERS = \ 448 libgdkx11include_HEADERS = \
457 gdkx-autocleanups.h \ 449 gdkx-autocleanups.h \
458 gdkx11applaunchcontext.h \ 450 gdkx11applaunchcontext.h \
459@@ -74,7 +88,6 @@ libgdkx11include_HEADERS = \ 451@@ -74,7 +90,6 @@ libgdkx11include_HEADERS = \
460 gdkx11display.h \ 452 gdkx11display.h \
461 gdkx11displaymanager.h \ 453 gdkx11displaymanager.h \
462 gdkx11dnd.h \ 454 gdkx11dnd.h \
@@ -464,7 +456,7 @@ index c488a31..d0aa7ce 100644
464 gdkx11keys.h \ 456 gdkx11keys.h \
465 gdkx11property.h \ 457 gdkx11property.h \
466 gdkx11screen.h \ 458 gdkx11screen.h \
467@@ -83,9 +96,16 @@ libgdkx11include_HEADERS = \ 459@@ -83,9 +98,16 @@ libgdkx11include_HEADERS = \
468 gdkx11visual.h \ 460 gdkx11visual.h \
469 gdkx11window.h 461 gdkx11window.h
470 462
@@ -482,7 +474,7 @@ index c488a31..d0aa7ce 100644
482+ 474+
483 -include $(top_srcdir)/git.mk 475 -include $(top_srcdir)/git.mk
484diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c 476diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
485index 5816d18..5d2dae6 100644 477index de91c64..42d50f6 100644
486--- a/gdk/x11/gdkdisplay-x11.c 478--- a/gdk/x11/gdkdisplay-x11.c
487+++ b/gdk/x11/gdkdisplay-x11.c 479+++ b/gdk/x11/gdkdisplay-x11.c
488@@ -37,7 +37,9 @@ 480@@ -37,7 +37,9 @@
@@ -495,19 +487,19 @@ index 5816d18..5d2dae6 100644
495 #include "gdk-private.h" 487 #include "gdk-private.h"
496 488
497 #include <glib.h> 489 #include <glib.h>
498@@ -2989,8 +2991,8 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class) 490@@ -2959,7 +2961,9 @@ gdk_x11_display_class_init (GdkX11DisplayClass * class)
499 display_class->convert_selection = _gdk_x11_display_convert_selection;
500 display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list; 491 display_class->text_property_to_utf8_list = _gdk_x11_display_text_property_to_utf8_list;
501 display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target; 492 display_class->utf8_to_string_target = _gdk_x11_display_utf8_to_string_target;
502- 493
494- display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
503+#ifdef HAVE_OPENGL 495+#ifdef HAVE_OPENGL
504 display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current; 496+ display_class->make_gl_context_current = gdk_x11_display_make_gl_context_current;
505-
506+#endif 497+#endif
507 _gdk_x11_windowing_init (); 498
508 } 499 display_class->get_default_seat = gdk_x11_display_get_default_seat;
500
509diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c 501diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
510index 2bd7f28..30032e0 100644 502index 9d8ed20..bd46b00 100644
511--- a/gdk/x11/gdkscreen-x11.c 503--- a/gdk/x11/gdkscreen-x11.c
512+++ b/gdk/x11/gdkscreen-x11.c 504+++ b/gdk/x11/gdkscreen-x11.c
513@@ -1968,3 +1968,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen) 505@@ -1968,3 +1968,8 @@ gdk_x11_screen_get_current_desktop (GdkScreen *screen)
@@ -520,7 +512,7 @@ index 2bd7f28..30032e0 100644
520+void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {} 512+void _gdk_x11_screen_update_visuals_for_gl (GdkScreen *screen) {}
521+#endif 513+#endif
522diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c 514diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
523index d08cee0..d354628 100644 515index 9ed087a..30d6eb7 100644
524--- a/gdk/x11/gdkwindow-x11.c 516--- a/gdk/x11/gdkwindow-x11.c
525+++ b/gdk/x11/gdkwindow-x11.c 517+++ b/gdk/x11/gdkwindow-x11.c
526@@ -36,7 +36,9 @@ 518@@ -36,7 +36,9 @@
@@ -533,7 +525,7 @@ index d08cee0..d354628 100644
533 #include "gdkprivate-x11.h" 525 #include "gdkprivate-x11.h"
534 #include "gdk-private.h" 526 #include "gdk-private.h"
535 527
536@@ -5768,7 +5770,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass) 528@@ -5782,7 +5784,9 @@ gdk_window_impl_x11_class_init (GdkWindowImplX11Class *klass)
537 impl_class->set_opaque_region = gdk_x11_window_set_opaque_region; 529 impl_class->set_opaque_region = gdk_x11_window_set_opaque_region;
538 impl_class->set_shadow_width = gdk_x11_window_set_shadow_width; 530 impl_class->set_shadow_width = gdk_x11_window_set_shadow_width;
539 impl_class->show_window_menu = gdk_x11_window_show_window_menu; 531 impl_class->show_window_menu = gdk_x11_window_show_window_menu;
@@ -557,71 +549,10 @@ index edb0ea7..a317d61 100644
557 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref) 549 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Keymap, g_object_unref)
558 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref) 550 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Screen, g_object_unref)
559 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref) 551 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GdkX11Visual, g_object_unref)
560diff --git a/gdk/x11/gdkx-with-gl-context.h b/gdk/x11/gdkx-with-gl-context.h 552diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx-with-gl-context.h
561new file mode 100644 553similarity index 100%
562index 0000000..ae05fa6 554rename from gdk/x11/gdkx.h
563--- /dev/null 555rename to gdk/x11/gdkx-with-gl-context.h
564+++ b/gdk/x11/gdkx-with-gl-context.h
565@@ -0,0 +1,59 @@
566+/* GDK - The GIMP Drawing Kit
567+ * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
568+ *
569+ * This library is free software; you can redistribute it and/or
570+ * modify it under the terms of the GNU Lesser General Public
571+ * License as published by the Free Software Foundation; either
572+ * version 2 of the License, or (at your option) any later version.
573+ *
574+ * This library is distributed in the hope that it will be useful,
575+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
576+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
577+ * Lesser General Public License for more details.
578+ *
579+ * You should have received a copy of the GNU Lesser General Public
580+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
581+ */
582+
583+/*
584+ * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
585+ * file for a list of people on the GTK+ Team. See the ChangeLog
586+ * files for a list of changes. These files are distributed with
587+ * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
588+ */
589+
590+#ifndef __GDK_X_H__
591+#define __GDK_X_H__
592+
593+#include <gdk/gdk.h>
594+
595+#include <X11/Xlib.h>
596+#include <X11/Xutil.h>
597+
598+#define __GDKX_H_INSIDE__
599+
600+#include <gdk/x11/gdkx11applaunchcontext.h>
601+#include <gdk/x11/gdkx11cursor.h>
602+#include <gdk/x11/gdkx11device.h>
603+#include <gdk/x11/gdkx11device-core.h>
604+#include <gdk/x11/gdkx11device-xi2.h>
605+#include <gdk/x11/gdkx11devicemanager.h>
606+#include <gdk/x11/gdkx11devicemanager-core.h>
607+#include <gdk/x11/gdkx11devicemanager-xi2.h>
608+#include <gdk/x11/gdkx11display.h>
609+#include <gdk/x11/gdkx11displaymanager.h>
610+#include <gdk/x11/gdkx11dnd.h>
611+#include <gdk/x11/gdkx11glcontext.h>
612+#include <gdk/x11/gdkx11keys.h>
613+#include <gdk/x11/gdkx11property.h>
614+#include <gdk/x11/gdkx11screen.h>
615+#include <gdk/x11/gdkx11selection.h>
616+#include <gdk/x11/gdkx11utils.h>
617+#include <gdk/x11/gdkx11visual.h>
618+#include <gdk/x11/gdkx11window.h>
619+
620+#include <gdk/x11/gdkx-autocleanups.h>
621+
622+#undef __GDKX_H_INSIDE__
623+
624+#endif /* __GDK_X_H__ */
625diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h 556diff --git a/gdk/x11/gdkx-without-gl-context.h b/gdk/x11/gdkx-without-gl-context.h
626new file mode 100644 557new file mode 100644
627index 0000000..c9e2617 558index 0000000..c9e2617
@@ -686,76 +617,11 @@ index 0000000..c9e2617
686+#undef __GDKX_H_INSIDE__ 617+#undef __GDKX_H_INSIDE__
687+ 618+
688+#endif /* __GDK_X_H__ */ 619+#endif /* __GDK_X_H__ */
689diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
690deleted file mode 100644
691index ae05fa6..0000000
692--- a/gdk/x11/gdkx.h
693+++ /dev/null
694@@ -1,59 +0,0 @@
695-/* GDK - The GIMP Drawing Kit
696- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
697- *
698- * This library is free software; you can redistribute it and/or
699- * modify it under the terms of the GNU Lesser General Public
700- * License as published by the Free Software Foundation; either
701- * version 2 of the License, or (at your option) any later version.
702- *
703- * This library is distributed in the hope that it will be useful,
704- * but WITHOUT ANY WARRANTY; without even the implied warranty of
705- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
706- * Lesser General Public License for more details.
707- *
708- * You should have received a copy of the GNU Lesser General Public
709- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
710- */
711-
712-/*
713- * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
714- * file for a list of people on the GTK+ Team. See the ChangeLog
715- * files for a list of changes. These files are distributed with
716- * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
717- */
718-
719-#ifndef __GDK_X_H__
720-#define __GDK_X_H__
721-
722-#include <gdk/gdk.h>
723-
724-#include <X11/Xlib.h>
725-#include <X11/Xutil.h>
726-
727-#define __GDKX_H_INSIDE__
728-
729-#include <gdk/x11/gdkx11applaunchcontext.h>
730-#include <gdk/x11/gdkx11cursor.h>
731-#include <gdk/x11/gdkx11device.h>
732-#include <gdk/x11/gdkx11device-core.h>
733-#include <gdk/x11/gdkx11device-xi2.h>
734-#include <gdk/x11/gdkx11devicemanager.h>
735-#include <gdk/x11/gdkx11devicemanager-core.h>
736-#include <gdk/x11/gdkx11devicemanager-xi2.h>
737-#include <gdk/x11/gdkx11display.h>
738-#include <gdk/x11/gdkx11displaymanager.h>
739-#include <gdk/x11/gdkx11dnd.h>
740-#include <gdk/x11/gdkx11glcontext.h>
741-#include <gdk/x11/gdkx11keys.h>
742-#include <gdk/x11/gdkx11property.h>
743-#include <gdk/x11/gdkx11screen.h>
744-#include <gdk/x11/gdkx11selection.h>
745-#include <gdk/x11/gdkx11utils.h>
746-#include <gdk/x11/gdkx11visual.h>
747-#include <gdk/x11/gdkx11window.h>
748-
749-#include <gdk/x11/gdkx-autocleanups.h>
750-
751-#undef __GDKX_H_INSIDE__
752-
753-#endif /* __GDK_X_H__ */
754diff --git a/gtk/Makefile.am b/gtk/Makefile.am 620diff --git a/gtk/Makefile.am b/gtk/Makefile.am
755index 801c3a5..2d8839d 100644 621index 6a53a2b..49a35e6 100644
756--- a/gtk/Makefile.am 622--- a/gtk/Makefile.am
757+++ b/gtk/Makefile.am 623+++ b/gtk/Makefile.am
758@@ -1246,14 +1246,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins. 624@@ -1351,14 +1351,13 @@ gtkprivatetypebuiltins.c: $(gtk_private_type_h_sources) gtkprivatetypebuiltins.
759 && cp xgen-gptbc gtkprivatetypebuiltins.c \ 625 && cp xgen-gptbc gtkprivatetypebuiltins.c \
760 && rm -f xgen-gptbc 626 && rm -f xgen-gptbc
761 627
@@ -772,7 +638,7 @@ index 801c3a5..2d8839d 100644
772 gtktestutils.c: gtktypefuncs.c 638 gtktestutils.c: gtktypefuncs.c
773 639
774diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c 640diff --git a/gtk/gtkglarea.c b/gtk/gtkglarea.c
775index 4098409..45fa1d1 100644 641index 245fc6b..4214ad1 100644
776--- a/gtk/gtkglarea.c 642--- a/gtk/gtkglarea.c
777+++ b/gtk/gtkglarea.c 643+++ b/gtk/gtkglarea.c
778@@ -28,7 +28,9 @@ 644@@ -28,7 +28,9 @@
@@ -868,7 +734,7 @@ index 4098409..45fa1d1 100644
868 734
869 static gboolean 735 static gboolean
870diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c 736diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c
871index 0611373..4499a29 100644 737index 4eab3a7..c4e900e 100644
872--- a/gtk/inspector/general.c 738--- a/gtk/inspector/general.c
873+++ b/gtk/inspector/general.c 739+++ b/gtk/inspector/general.c
874@@ -33,8 +33,10 @@ 740@@ -33,8 +33,10 @@
@@ -882,7 +748,7 @@ index 0611373..4499a29 100644
882 748
883 #ifdef GDK_WINDOWING_WIN32 749 #ifdef GDK_WINDOWING_WIN32
884 #include "win32/gdkwin32.h" 750 #include "win32/gdkwin32.h"
885@@ -146,6 +148,7 @@ append_extension_row (GtkInspectorGeneral *gen, 751@@ -147,6 +149,7 @@ append_extension_row (GtkInspectorGeneral *gen,
886 gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label); 752 gtk_size_group_add_widget (GTK_SIZE_GROUP (gen->priv->labels), label);
887 } 753 }
888 754
@@ -890,7 +756,7 @@ index 0611373..4499a29 100644
890 #ifdef GDK_WINDOWING_X11 756 #ifdef GDK_WINDOWING_X11
891 static void 757 static void
892 append_glx_extension_row (GtkInspectorGeneral *gen, 758 append_glx_extension_row (GtkInspectorGeneral *gen,
893@@ -155,6 +158,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen, 759@@ -156,6 +159,7 @@ append_glx_extension_row (GtkInspectorGeneral *gen,
894 append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext)); 760 append_extension_row (gen, ext, epoxy_has_glx_extension (dpy, 0, ext));
895 } 761 }
896 #endif 762 #endif
@@ -898,27 +764,27 @@ index 0611373..4499a29 100644
898 764
899 #ifdef GDK_WINDOWING_WAYLAND 765 #ifdef GDK_WINDOWING_WAYLAND
900 static void 766 static void
901@@ -174,6 +178,7 @@ init_gl (GtkInspectorGeneral *gen) 767@@ -171,6 +175,7 @@ append_egl_extension_row (GtkInspectorGeneral *gen,
902 768 static void
903 display = gdk_display_get_default (); 769 init_gl (GtkInspectorGeneral *gen)
904 770 {
905+#ifdef HAVE_OPENGL 771+#ifdef HAVE_OPENGL
906 #ifdef GDK_WINDOWING_X11 772 #ifdef GDK_WINDOWING_X11
907 if (GDK_IS_X11_DISPLAY (display)) 773 if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
908 { 774 {
909@@ -199,6 +204,7 @@ init_gl (GtkInspectorGeneral *gen) 775@@ -197,6 +202,7 @@ init_gl (GtkInspectorGeneral *gen)
910 } 776 }
911 else 777 else
912 #endif 778 #endif
913+#endif 779+#endif
914 #ifdef GDK_WINDOWING_WAYLAND 780 #ifdef GDK_WINDOWING_WAYLAND
915 if (GDK_IS_WAYLAND_DISPLAY (display)) 781 if (GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()))
916 { 782 {
917diff --git a/tests/Makefile.am b/tests/Makefile.am 783diff --git a/tests/Makefile.am b/tests/Makefile.am
918index 50f2986..3b39169 100644 784index 681807d..2941a36 100644
919--- a/tests/Makefile.am 785--- a/tests/Makefile.am
920+++ b/tests/Makefile.am 786+++ b/tests/Makefile.am
921@@ -78,8 +78,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \ 787@@ -80,8 +80,6 @@ noinst_PROGRAMS = $(TEST_PROGS) \
922 testfullscreen \ 788 testfullscreen \
923 testgeometry \ 789 testgeometry \
924 testgiconpixbuf \ 790 testgiconpixbuf \
@@ -927,18 +793,19 @@ index 50f2986..3b39169 100644
927 testgrid \ 793 testgrid \
928 testgtk \ 794 testgtk \
929 testheaderbar \ 795 testheaderbar \
930@@ -166,10 +164,16 @@ noinst_PROGRAMS = $(TEST_PROGS) \ 796@@ -169,11 +167,17 @@ noinst_PROGRAMS = $(TEST_PROGS) \
931 testactionbar \ 797 testactionbar \
932 testwindowsize \ 798 testwindowsize \
933 testpopover \ 799 testpopover \
934- gdkgears \ 800- gdkgears \
935 listmodel \ 801 listmodel \
802 testpopup \
936 $(NULL) 803 $(NULL)
937 804
938+if HAVE_OPENGL 805+if HAVE_OPENGL
939+noinst_PROGRAMS += 806+noinst_PROGRAMS +=
940+ testglarea \ 807+ testglarea \
941+ testglblending \ 808+ testglblending \
942+ gdkgears 809+ gdkgears
943+endif 810+endif
944+ 811+
@@ -946,11 +813,11 @@ index 50f2986..3b39169 100644
946 noinst_PROGRAMS += testerrors 813 noinst_PROGRAMS += testerrors
947 endif 814 endif
948diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c 815diff --git a/testsuite/gtk/objects-finalize.c b/testsuite/gtk/objects-finalize.c
949index 3568505..682ea10 100644 816index e0ebee0..703643c 100644
950--- a/testsuite/gtk/objects-finalize.c 817--- a/testsuite/gtk/objects-finalize.c
951+++ b/testsuite/gtk/objects-finalize.c 818+++ b/testsuite/gtk/objects-finalize.c
952@@ -114,8 +114,10 @@ main (int argc, char **argv) 819@@ -115,8 +115,10 @@ main (int argc, char **argv)
953 all_types[i] != GDK_TYPE_X11_DISPLAY && 820 all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_CORE &&
954 all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 && 821 all_types[i] != GDK_TYPE_X11_DEVICE_MANAGER_XI2 &&
955 all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER && 822 all_types[i] != GDK_TYPE_X11_DISPLAY_MANAGER &&
956+#ifdef HAVE_OPENGL 823+#ifdef HAVE_OPENGL
@@ -961,5 +828,5 @@ index 3568505..682ea10 100644
961 all_types[i] != GDK_TYPE_PIXBUF_LOADER && 828 all_types[i] != GDK_TYPE_PIXBUF_LOADER &&
962 all_types[i] != gdk_pixbuf_simple_anim_iter_get_type()) 829 all_types[i] != gdk_pixbuf_simple_anim_iter_get_type())
963-- 830--
9642.8.1 8312.1.4
965 832
diff --git a/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch b/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
new file mode 100644
index 0000000000..634b3a46ff
--- /dev/null
+++ b/meta/recipes-gnome/gtk+/gtk+3/0004-configure.ac-Fix-wayland-protocols-path.patch
@@ -0,0 +1,36 @@
1From 97b78e566634579bbae51be914aeaaa921137a8b Mon Sep 17 00:00:00 2001
2From: Jussi Kukkonen <jussi.kukkonen@intel.com>
3Date: Thu, 9 Jun 2016 11:21:36 +0300
4Subject: [PATCH 4/4] configure.ac: Fix wayland-protocols path
5
6The wayland-protocols directory is used during build: Fix the path
7to point to sysroot specified in recipe.
8
9Normally PKG_CONFIG_SYSROOT_DIR could be used in configure.ac but that
10breaks multilib gtk+ as it would point to multilib sysroot when the
11(allarch) wayland-protocols is actually in the machine sysroot.
12
13Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
14Upstream-Status: Inappropriate [embedded specific]
15
16Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
17---
18 configure.ac | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/configure.ac b/configure.ac
22index a3e9beb..dde9dc5 100644
23--- a/configure.ac
24+++ b/configure.ac
25@@ -461,7 +461,7 @@ fi
26 if test "$enable_wayland_backend" = "yes"; then
27 # For the cairo image backend
28 cairo_backends="$cairo_backends cairo"
29- AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, `$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
30+ AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, ${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`)
31 GDK_BACKENDS="$GDK_BACKENDS wayland"
32 GDK_WINDOWING="$GDK_WINDOWING
33 #define GDK_WINDOWING_WAYLAND"
34--
352.1.4
36
diff --git a/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch b/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
deleted file mode 100644
index 32d8a84792..0000000000
--- a/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
+++ /dev/null
@@ -1,118 +0,0 @@
1window: Check if we can use CSD before enabling them
2
3Upstream-Status: Backport
4Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
5
6
7From c5e5ee67490e7e7af56052d8f8beb75db002c2f1 Mon Sep 17 00:00:00 2001
8From: Emmanuele Bassi <ebassi@gnome.org>
9Date: Wed, 3 Jun 2015 14:07:29 +0100
10Subject: window: Check if we can use CSD before enabling them
11
12The change in 03213b9509fc1df16c66194ea168aed6c15110e9 changed the rules
13as to when CSD can be enabled, but it also unconditionally enables CSD
14with the implicit assumption that client-side shadows were the real
15issue, and that we could work around that by drawing our own borders.
16This also means that setting a titlebar for a GtkWindow will enable CSD
17unconditionally.
18
19In reality, some window managers (like Matchbox) *only* support
20server-side decorations, and will ignore all hints to the contrary, to
21the point of drawing decorations at random locations on top of the
22window.
23
24Since CSD are enabled unconditionally, the GTK_CSD environment variable
25is also not a suitable escape hatch.
26
27In the grand tradition of asking ourselves if we should do something
28just because we can, we should split the environment checks from the
29checks on what the user requested; by doing that, we can also check
30when enabling client-side decorations, and ideally bail out if needed.
31
32https://bugzilla.gnome.org/show_bug.cgi?id=750343
33
34diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
35index 423c6bd..9fe882f 100644
36--- a/gtk/gtkwindow.c
37+++ b/gtk/gtkwindow.c
38@@ -4056,6 +4056,32 @@ gtk_window_supports_client_shadow (GtkWindow *window)
39 return TRUE;
40 }
41
42+static gboolean
43+gtk_window_can_use_csd (GtkWindow *window)
44+{
45+ const gchar *csd_env;
46+
47+#ifdef GDK_WINDOWING_BROADWAY
48+ if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
49+ return TRUE;
50+#endif
51+
52+#ifdef GDK_WINDOWING_WAYLAND
53+ if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
54+ return TRUE;
55+#endif
56+
57+#ifdef GDK_WINDOWING_MIR
58+ if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
59+ return TRUE;
60+#endif
61+
62+ csd_env = g_getenv ("GTK_CSD");
63+
64+ /* If GTK_CSD is unset we default to CSD support */
65+ return csd_env == NULL || (strcmp (csd_env, "1") == 0);
66+}
67+
68 static void
69 gtk_window_enable_csd (GtkWindow *window)
70 {
71@@ -4063,6 +4089,10 @@ gtk_window_enable_csd (GtkWindow *window)
72 GtkWidget *widget = GTK_WIDGET (window);
73 GdkVisual *visual;
74
75+ /* If the environment does not support CSD, then there's no point in enabling them */
76+ if (!gtk_window_can_use_csd (window))
77+ return;
78+
79 /* We need a visual with alpha for client shadows */
80 if (priv->use_client_shadow)
81 {
82@@ -5839,7 +5869,6 @@ static gboolean
83 gtk_window_should_use_csd (GtkWindow *window)
84 {
85 GtkWindowPrivate *priv = window->priv;
86- const gchar *csd_env;
87
88 if (priv->csd_requested)
89 return TRUE;
90@@ -5850,24 +5879,7 @@ gtk_window_should_use_csd (GtkWindow *window)
91 if (priv->type == GTK_WINDOW_POPUP)
92 return FALSE;
93
94-#ifdef GDK_WINDOWING_BROADWAY
95- if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
96- return TRUE;
97-#endif
98-
99-#ifdef GDK_WINDOWING_WAYLAND
100- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
101- return TRUE;
102-#endif
103-
104-#ifdef GDK_WINDOWING_MIR
105- if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
106- return TRUE;
107-#endif
108-
109- csd_env = g_getenv ("GTK_CSD");
110-
111- return (g_strcmp0 (csd_env, "1") == 0);
112+ return gtk_window_can_use_csd (window);
113 }
114
115 static void
116--
117cgit v0.10.2
118