[gtk+] textview: only set invalidate handler for text window.



commit 0eb8479256a879164484bec4513e9c1a5329a4d5
Author: Christian Hergert <christian hergert me>
Date:   Fri Sep 6 13:58:37 2013 -0700

    textview: only set invalidate handler for text window.

 gtk/gtktextview.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 8a1bbdd..cc93b51 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -9029,8 +9029,11 @@ text_window_realize (GtkTextWindow *win,
   win->window = gdk_window_new (window,
                                 &attributes, attributes_mask);
 
-  gdk_window_set_invalidate_handler (win->window,
-                                     text_window_invalidate_handler);
+  if (win->type == GTK_TEXT_WINDOW_TEXT)
+    {
+      gdk_window_set_invalidate_handler (win->window,
+                                         text_window_invalidate_handler);
+    }
 
   gdk_window_show (win->window);
   gtk_widget_register_window (win->widget, win->window);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]