[evince] ev-view: call gtk_style_context_set_background()
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] ev-view: call gtk_style_context_set_background()
- Date: Sat, 2 Feb 2013 13:57:51 +0000 (UTC)
commit 17859243df98bcd9698c67081f2443a08e60caeb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Fri Feb 1 11:14:59 2013 +0100
ev-view: call gtk_style_context_set_background()
Even if we now render a background in _draw() with
gtk_render_background, using gtk_style_context_set_background() in
realize makes the backing GdkWindow not being completely transparent,
which enables GTK to apply optimizations during the paint cycle.
The result is, especially in clutter-gtk applications such as Documents,
scrolling in a document page is much smoother.
https://bugzilla.gnome.org/show_bug.cgi?id=692988
libview/ev-view.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-view.c b/libview/ev-view.c
index f5e9e38..dd6b728 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -3455,6 +3455,9 @@ ev_view_realize (GtkWidget *widget)
&attributes, attributes_mask);
gtk_widget_set_window (widget, window);
gdk_window_set_user_data (window, widget);
+
+ gtk_style_context_set_background (gtk_widget_get_style_context (widget),
+ window);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]