summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3')
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch60
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch118
-rw-r--r--import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch35
3 files changed, 213 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch
new file mode 100644
index 000000000..c8c480c5e
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Do-not-try-to-initialize-GL-without-libGL.patch
@@ -0,0 +1,60 @@
+From fc22058a10db913534f11348f86681fe9e1838e5 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen <jussi.kukkonen@intel.com>
+Date: Fri, 16 Oct 2015 16:35:16 +0300
+Subject: [PATCH] Do not try to initialize GL without libGL
+
+_gdk_x11_screen_update_visuals_for_gl() will end up calling epoxys
+GLX api which will exit() if libGL.so.1 is not present. We do not
+want that to happen and we don't want every app to have to set
+"GDK_GL=disabled" environment variable: so use #ifdef set based on
+opengl distro feature.
+
+Upstream is not interested in the fix as it is: Either epoxy should be
+fixed (to not exit) or GTK+ possibly could do some additional probing
+before calling epoxy APIs.
+
+Upstream-Status: Denied
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+---
+ configure.ac | 7 +++++++
+ gdk/x11/gdkvisual-x11.c | 5 +++++
+ 2 files changed, 12 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 729a62e..58cc1ac 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -328,6 +328,13 @@ AC_ARG_ENABLE(mir-backend,
+ [enable the Mir gdk backend])],
+ [backend_set=yes])
+
++AC_ARG_ENABLE(glx,
++ [AS_HELP_STRING([--enable-glx],
++ [When enabled Gdk will try to initialize GLX])])
++AS_IF([test "x$enable_glx" != "xno"], [
++ AC_DEFINE([HAVE_GLX], [], [GLX will be available at runtime])
++])
++
+ if test -z "$backend_set"; then
+ if test "$platform_win32" = yes; then
+ enable_win32_backend=yes
+diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
+index f3b062d..c8243f4 100644
+--- a/gdk/x11/gdkvisual-x11.c
++++ b/gdk/x11/gdkvisual-x11.c
+@@ -345,7 +345,12 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen)
+ /* If GL is available we want to pick better default/rgba visuals,
+ as we care about glx details such as alpha/depth/stencil depth,
+ stereo and double buffering */
++ /* update_visuals_for_gl() will end up calling epoxy GLX api which
++ will exit if libgl is not there: so only do this if we know GL
++ is available */
++#ifdef HAVE_GLX
+ _gdk_x11_screen_update_visuals_for_gl (screen);
++#endif
+ }
+
+ gint
+--
+2.1.4
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
new file mode 100644
index 000000000..32d8a8479
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/Dont-force-csd.patch
@@ -0,0 +1,118 @@
+window: Check if we can use CSD before enabling them
+
+Upstream-Status: Backport
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
+
+
+From c5e5ee67490e7e7af56052d8f8beb75db002c2f1 Mon Sep 17 00:00:00 2001
+From: Emmanuele Bassi <ebassi@gnome.org>
+Date: Wed, 3 Jun 2015 14:07:29 +0100
+Subject: window: Check if we can use CSD before enabling them
+
+The change in 03213b9509fc1df16c66194ea168aed6c15110e9 changed the rules
+as to when CSD can be enabled, but it also unconditionally enables CSD
+with the implicit assumption that client-side shadows were the real
+issue, and that we could work around that by drawing our own borders.
+This also means that setting a titlebar for a GtkWindow will enable CSD
+unconditionally.
+
+In reality, some window managers (like Matchbox) *only* support
+server-side decorations, and will ignore all hints to the contrary, to
+the point of drawing decorations at random locations on top of the
+window.
+
+Since CSD are enabled unconditionally, the GTK_CSD environment variable
+is also not a suitable escape hatch.
+
+In the grand tradition of asking ourselves if we should do something
+just because we can, we should split the environment checks from the
+checks on what the user requested; by doing that, we can also check
+when enabling client-side decorations, and ideally bail out if needed.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=750343
+
+diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
+index 423c6bd..9fe882f 100644
+--- a/gtk/gtkwindow.c
++++ b/gtk/gtkwindow.c
+@@ -4056,6 +4056,32 @@ gtk_window_supports_client_shadow (GtkWindow *window)
+ return TRUE;
+ }
+
++static gboolean
++gtk_window_can_use_csd (GtkWindow *window)
++{
++ const gchar *csd_env;
++
++#ifdef GDK_WINDOWING_BROADWAY
++ if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++#ifdef GDK_WINDOWING_WAYLAND
++ if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++#ifdef GDK_WINDOWING_MIR
++ if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
++ return TRUE;
++#endif
++
++ csd_env = g_getenv ("GTK_CSD");
++
++ /* If GTK_CSD is unset we default to CSD support */
++ return csd_env == NULL || (strcmp (csd_env, "1") == 0);
++}
++
+ static void
+ gtk_window_enable_csd (GtkWindow *window)
+ {
+@@ -4063,6 +4089,10 @@ gtk_window_enable_csd (GtkWindow *window)
+ GtkWidget *widget = GTK_WIDGET (window);
+ GdkVisual *visual;
+
++ /* If the environment does not support CSD, then there's no point in enabling them */
++ if (!gtk_window_can_use_csd (window))
++ return;
++
+ /* We need a visual with alpha for client shadows */
+ if (priv->use_client_shadow)
+ {
+@@ -5839,7 +5869,6 @@ static gboolean
+ gtk_window_should_use_csd (GtkWindow *window)
+ {
+ GtkWindowPrivate *priv = window->priv;
+- const gchar *csd_env;
+
+ if (priv->csd_requested)
+ return TRUE;
+@@ -5850,24 +5879,7 @@ gtk_window_should_use_csd (GtkWindow *window)
+ if (priv->type == GTK_WINDOW_POPUP)
+ return FALSE;
+
+-#ifdef GDK_WINDOWING_BROADWAY
+- if (GDK_IS_BROADWAY_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+-#ifdef GDK_WINDOWING_WAYLAND
+- if (GDK_IS_WAYLAND_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+-#ifdef GDK_WINDOWING_MIR
+- if (GDK_IS_MIR_DISPLAY (gtk_widget_get_display (GTK_WIDGET (window))))
+- return TRUE;
+-#endif
+-
+- csd_env = g_getenv ("GTK_CSD");
+-
+- return (g_strcmp0 (csd_env, "1") == 0);
++ return gtk_window_can_use_csd (window);
+ }
+
+ static void
+--
+cgit v0.10.2
+
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
new file mode 100644
index 000000000..3b4beeb71
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk+/gtk+3/hardcoded_libtool.patch
@@ -0,0 +1,35 @@
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
+
+Index: gtk+-3.8.2/configure.ac
+===================================================================
+--- gtk+-3.8.2.orig/configure.ac
++++ gtk+-3.8.2/configure.ac
+@@ -531,7 +531,7 @@ AC_MSG_CHECKING([Whether to write depend
+ case $enable_explicit_deps in
+ auto)
+ export SED
+- deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
++ deplibs_check_method=`(./$host_alias-libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
+ if test "x$deplibs_check_method" != xpass_all || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+@@ -793,7 +793,7 @@ else
+ dnl Now we check to see if our libtool supports shared lib deps
+ dnl (in a rather ugly way even)
+ if $dynworks; then
+- module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
++ module_libtool_config="${CONFIG_SHELL-/bin/sh} ./$host_alias-libtool --config"
+ module_deplibs_check=`$module_libtool_config | \
+ grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
+ sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
+@@ -1528,7 +1528,7 @@ fi
+ # We are using gmodule-no-export now, but I'm leaving the stripping
+ # code in place for now, since pango and atk still require gmodule.
+ export SED
+-export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++export_dynamic=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ if test -n "$export_dynamic"; then
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
OpenPOWER on IntegriCloud