diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-02-05 12:27:39 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-02-07 11:11:38 +0100 |
commit | ebb84e8d193723cfa6485ff91f50cdedbe947f0f (patch) | |
tree | f59274815dd96433311a60b9bb8e5f380b8626de | |
parent | b57a2c8341bbadd08428ba7f421a2172b3465b06 (diff) | |
download | gtk+-ebb84e8d193723cfa6485ff91f50cdedbe947f0f.tar.gz |
TextHandle: Don't draw handles if not visible
When calling gtk_widget_draw() on the entry gtk_cairo_should_draw_window()
will return TRUE for all windows. This is used when rendering a widget to
somewhere other than the screen, and its now used for transparent widgets.
This caused the texthandle to always draw itself and terminate the draw
handler for the entry.
Instead we now only draw the markers when really visible, plus we return
FALSE to avoid stopping the entry drawing.
https://bugzilla.gnome.org/show_bug.cgi?id=687842
-rw-r--r-- | gtk/gtktexthandle.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c index 871b3ac73e..97449b485b 100644 --- a/gtk/gtktexthandle.c +++ b/gtk/gtktexthandle.c @@ -212,6 +212,7 @@ gtk_text_handle_widget_draw (GtkWidget *widget, { GtkTextHandlePrivate *priv; GtkTextHandlePosition pos; + HandleWindow *handle_window; priv = handle->priv; @@ -225,8 +226,11 @@ gtk_text_handle_widget_draw (GtkWidget *widget, else return FALSE; - _gtk_text_handle_draw (handle, cr, pos); - return TRUE; + handle_window = &priv->windows[pos]; + if (gdk_window_is_visible (handle_window->window)) + _gtk_text_handle_draw (handle, cr, pos); + + return FALSE; } static gboolean |