summaryrefslogtreecommitdiff
path: root/gtk/gtktextdisplay.c
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2011-12-21 23:27:15 +0000
committerRui Matos <tiagomatos@gmail.com>2012-01-09 16:45:44 +0000
commit2efa658a416b0c651ef13ae99a601d52841e69fd (patch)
tree586675c2ac424c1bae34686958d2089cb973db0c /gtk/gtktextdisplay.c
parentb203ea2f938ea1ff1f25fd77cb1de7f90243c35b (diff)
downloadgtk+-2efa658a416b0c651ef13ae99a601d52841e69fd.tar.gz
textdisplay: Use the widget state flags as a base for drawing
Diffstat (limited to 'gtk/gtktextdisplay.c')
-rw-r--r--gtk/gtktextdisplay.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtktextdisplay.c b/gtk/gtktextdisplay.c
index 7911d2fb56..42928f1f74 100644
--- a/gtk/gtktextdisplay.c
+++ b/gtk/gtktextdisplay.c
@@ -584,10 +584,9 @@ render_para (GtkTextRenderer *text_renderer,
screen_width = line_display->total_width;
context = gtk_widget_get_style_context (text_renderer->widget);
+ state = gtk_widget_get_state_flags (text_renderer->widget);
- state = GTK_STATE_FLAG_SELECTED;
- if (gtk_widget_has_focus (text_renderer->widget))
- state |= GTK_STATE_FLAG_FOCUSED;
+ state |= GTK_STATE_FLAG_SELECTED;
gtk_style_context_get_background_color (context, state, &selection);