Alexander Pyhalov
2017-03-23 e1bfa108529e07fa030b91b20f544ffea50d0941
gtk+3: fix black window on application startup
1 files added
1 files modified
34 ■■■■■ changed files
components/library/gtk+3/Makefile 1 ●●●● patch | view | raw | blame | history
components/library/gtk+3/patches/04-gtkwindow-continue-calling-gtk_style_context_set_bac.patch 33 ●●●●● patch | view | raw | blame | history
components/library/gtk+3/Makefile
@@ -17,6 +17,7 @@
COMPONENT_NAME= gtk+
COMPONENT_VERSION= 3.18.9
COMPONENT_REVISION= 1
COMPONENT_SUMMARY= GTK+ - GIMP Toolkit Library for creation of graphical user interfaces
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
components/library/gtk+3/patches/04-gtkwindow-continue-calling-gtk_style_context_set_bac.patch
New file
@@ -0,0 +1,33 @@
From e7528ab9b8ddbad892d9d5ce323549086897b72a Mon Sep 17 00:00:00 2001
From: Lars Uebernickel <lars.uebernickel@canonical.com>
Date: Mon, 16 Nov 2015 17:29:50 +0100
Subject: [PATCH] gtkwindow: continue calling
 gtk_style_context_set_background()
Not doing so introduces black flicker when creating a new window on
compiz, because it lacks support for the frame sync protocol.
https://bugzilla.gnome.org/show_bug.cgi?id=748498
---
 gtk/gtkwindow.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2d9f4b5..0476b6b 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7122,6 +7122,11 @@ gtk_window_realize (GtkWidget *widget)
   gtk_widget_register_window (widget, gdk_window);
   gtk_widget_set_realized (widget, TRUE);
+  G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+  if (!gtk_widget_get_app_paintable (widget))
+    gtk_style_context_set_background (gtk_widget_get_style_context (widget), gdk_window);
+  G_GNUC_END_IGNORE_DEPRECATIONS
+
   attributes.x = allocation.x;
   attributes.y = allocation.y;
   attributes.width = allocation.width;
--
2.6.2