summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2017-01-25 15:14:08 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-04-07 12:08:53 +0200
commite04e355523a00c5d6b2872b2398144f54b667381 (patch)
treec8e35b14bc594700c030787448a6b10fd5f89d52
parentbcf16669f988d0453e2092ca597bbf976898dd69 (diff)
lxterminal: address garbled title bar with gtk+3
The old fix was no longer working after the update to gtk+3. Add a similar fix for gtk+3 as the one we used with gtk+2. While at it do it in a two step process, only if the original call does return with 'NULL' use a less specific gdk call. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r--lxde-layer/recipes-lxde/lxterminal/files/0001-lxterminal.c-fix-garbled-titlebar.patch41
-rw-r--r--lxde-layer/recipes-lxde/lxterminal/files/fix_garbled_titlebar.patch11
-rw-r--r--lxde-layer/recipes-lxde/lxterminal/lxterminal_%.bbappend2
3 files changed, 42 insertions, 12 deletions
diff --git a/lxde-layer/recipes-lxde/lxterminal/files/0001-lxterminal.c-fix-garbled-titlebar.patch b/lxde-layer/recipes-lxde/lxterminal/files/0001-lxterminal.c-fix-garbled-titlebar.patch
new file mode 100644
index 0000000..491e7ea
--- /dev/null
+++ b/lxde-layer/recipes-lxde/lxterminal/files/0001-lxterminal.c-fix-garbled-titlebar.patch
@@ -0,0 +1,41 @@
+From a2632fc3cb1096b1add5238d6b4fb090a7427273 Mon Sep 17 00:00:00 2001
+From: Max Krummenacher <max.krummenacher@toradex.com>
+Date: Wed, 25 Jan 2017 14:48:42 +0100
+Subject: [PATCH] lxterminal.c: fix garbled titlebar
+
+With the T20/T30 X driver the titlebar and window boarder is not drawn at all
+but filled with random pixels or painted with a random copy of some other
+screen area.
+
+Fix this by falling back to a working gdk function if the more complex one
+fails due to an unsupported feature.
+
+Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
+---
+ src/lxterminal.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/lxterminal.c b/src/lxterminal.c
+index c218aa7..3d56ba2 100644
+--- a/src/lxterminal.c
++++ b/src/lxterminal.c
+@@ -1477,12 +1477,15 @@ LXTerminal * lxterminal_initialize(LXTermWindow * lxtermwin, CommandArguments *
+ /* Try to get an RGBA visual (colormap) and assign it to the new window. */
+ #if GTK_CHECK_VERSION (2, 90, 8)
+ GdkVisual *visual = gdk_screen_get_rgba_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window)));
++ if (visual != NULL) {
++ visual = gdk_screen_get_system_visual(gtk_widget_get_screen(GTK_WIDGET(terminal->window)));
++ }
+ if (visual != NULL)
+ {
+ gtk_widget_set_visual(terminal->window, visual);
+ }
+ #else
+- GdkColormap *colormap = gdk_screen_get_rgba_colormap(gtk_widget_get_screen(GTK_WIDGET(terminal->window)));
++ GdkColormap *colormap = gdk_colormap_get_system();
+ if (colormap != NULL)
+ {
+ gtk_widget_set_colormap(terminal->window, colormap);
+--
+2.5.5
+
diff --git a/lxde-layer/recipes-lxde/lxterminal/files/fix_garbled_titlebar.patch b/lxde-layer/recipes-lxde/lxterminal/files/fix_garbled_titlebar.patch
deleted file mode 100644
index 5dcd195..0000000
--- a/lxde-layer/recipes-lxde/lxterminal/files/fix_garbled_titlebar.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- lxterminal-0.1.11/src/lxterminal.c.orig 2013-04-02 12:58:03.985684096 +0200
-+++ lxterminal-0.1.11/src/lxterminal.c 2013-04-02 12:56:58.336136155 +0200
-@@ -1220,7 +1220,7 @@
- if (visual != NULL)
- gtk_widget_set_visual(terminal->window, visual);
- #else
-- GdkColormap *colormap = gdk_screen_get_rgba_colormap(gtk_widget_get_screen(GTK_WIDGET(terminal->window)));
-+ GdkColormap *colormap = gdk_colormap_get_system();
- if (colormap != NULL)
- gtk_widget_set_colormap(terminal->window, colormap);
- #endif
diff --git a/lxde-layer/recipes-lxde/lxterminal/lxterminal_%.bbappend b/lxde-layer/recipes-lxde/lxterminal/lxterminal_%.bbappend
index 1cc9cf1..7d023d3 100644
--- a/lxde-layer/recipes-lxde/lxterminal/lxterminal_%.bbappend
+++ b/lxde-layer/recipes-lxde/lxterminal/lxterminal_%.bbappend
@@ -1,5 +1,5 @@
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
- file://fix_garbled_titlebar.patch \
+ file://0001-lxterminal.c-fix-garbled-titlebar.patch \
"