Fix hich CPU usage when selecting text.
reported by mpi@
This commit is contained in:
parent
3c79027815
commit
8f8eb322e8
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.131 2015/08/17 19:10:12 sthen Exp $
|
||||
# $OpenBSD: Makefile,v 1.132 2015/10/12 06:09:31 ajacoutot Exp $
|
||||
|
||||
SHARED_ONLY= Yes
|
||||
|
||||
@ -6,7 +6,7 @@ COMMENT= GNOME document viewer
|
||||
|
||||
GNOME_PROJECT= evince
|
||||
GNOME_VERSION= 3.16.1
|
||||
REVISION= 1
|
||||
REVISION= 2
|
||||
|
||||
MAJ_V= 3.0
|
||||
SUBST_VARS= MAJ_V
|
||||
|
45
graphics/evince/patches/patch-libview_ev-view_c
Normal file
45
graphics/evince/patches/patch-libview_ev-view_c
Normal file
@ -0,0 +1,45 @@
|
||||
$OpenBSD: patch-libview_ev-view_c,v 1.1 2015/10/12 06:09:31 ajacoutot Exp $
|
||||
|
||||
From 1987f04ea36329b1bd61d053a19d9e341e0454ce Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Keller <sebastian-keller@gmx.de>
|
||||
Date: Tue, 22 Sep 2015 23:25:34 +0200
|
||||
Subject: libview: Save/restore context when getting colors for a different state
|
||||
|
||||
--- libview/ev-view.c.orig Wed May 27 12:02:51 2015
|
||||
+++ libview/ev-view.c Mon Oct 12 07:59:59 2015
|
||||
@@ -4125,7 +4125,9 @@ get_cursor_color (GtkStyleContext *context,
|
||||
|
||||
gdk_color_free (style_color);
|
||||
} else {
|
||||
+ gtk_style_context_save (context);
|
||||
gtk_style_context_get_color (context, GTK_STATE_FLAG_NORMAL, color);
|
||||
+ gtk_style_context_restore (context);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6102,7 +6104,9 @@ draw_rubberband (EvView *view,
|
||||
GdkRGBA color;
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (view));
|
||||
+ gtk_style_context_save (context);
|
||||
gtk_style_context_get_background_color (context, GTK_STATE_FLAG_SELECTED, &color);
|
||||
+ gtk_style_context_restore (context);
|
||||
cairo_save (cr);
|
||||
|
||||
cairo_set_source_rgba (cr, color.red, color.green, color.blue, alpha);
|
||||
@@ -6223,12 +6227,15 @@ _ev_view_get_selection_colors (EvView *view,
|
||||
|
||||
state = gtk_widget_has_focus (widget) ? GTK_STATE_FLAG_SELECTED : GTK_STATE_FLAG_ACTIVE;
|
||||
context = gtk_widget_get_style_context (widget);
|
||||
+ gtk_style_context_save (context);
|
||||
|
||||
if (bg_color)
|
||||
gtk_style_context_get_background_color (context, state, bg_color);
|
||||
|
||||
if (fg_color)
|
||||
gtk_style_context_get_color (context, state, fg_color);
|
||||
+
|
||||
+ gtk_style_context_restore (context);
|
||||
}
|
||||
|
||||
static void
|
Loading…
Reference in New Issue
Block a user