summaryrefslogtreecommitdiff
path: root/lxde-layer/recipes-lxde/lxterminal/files/0001-lxterminal.c-fix-garbled-titlebar.patch
blob: 491e7eab92aa212f13a8d6300be839cd6c67b446 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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