diff options
author | Martin Wimpress <[email protected]> | 2015-06-20 14:23:29 +0100 |
---|---|---|
committer | Martin Wimpress <[email protected]> | 2015-06-20 14:23:29 +0100 |
commit | 4e88a3edcbba1c2c6775f4144fa426017f9bd73b (patch) | |
tree | ec040552d8cd5954144c0997db4fe52cb26a862f /eel/eel-canvas.c | |
parent | 77ebf88b678149862def827a7e5d134e9df13122 (diff) | |
parent | c4c4fed16fd80654d40b356700076a27e49fc227 (diff) | |
download | caja-4e88a3edcbba1c2c6775f4144fa426017f9bd73b.tar.bz2 caja-4e88a3edcbba1c2c6775f4144fa426017f9bd73b.tar.xz |
Merge pull request #430 from mate-desktop/eel-stuff
[GTK+3] eel: fix bad positioning of rename window in certain cases
Diffstat (limited to 'eel/eel-canvas.c')
-rw-r--r-- | eel/eel-canvas.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/eel/eel-canvas.c b/eel/eel-canvas.c index 602986c8..f0245f7a 100644 --- a/eel/eel-canvas.c +++ b/eel/eel-canvas.c @@ -3109,11 +3109,19 @@ eel_canvas_expose (GtkWidget *widget, GdkEventExpose *event) return FALSE; bin_window = gtk_layout_get_bin_window (GTK_LAYOUT (widget)); + + if (!gtk_cairo_should_draw_window (cr, bin_window)) + return FALSE; + + cairo_save (cr); + gtk_cairo_transform_to_window (cr, widget, bin_window); region = eel_cairo_get_clip_region (cr); - if (region == NULL) + if (region == NULL) { + cairo_restore (cr); return FALSE; + } #else if (!gtk_widget_is_drawable (widget) || (event->window != gtk_layout_get_bin_window (&canvas->layout))) return FALSE; #endif @@ -3164,14 +3172,17 @@ eel_canvas_expose (GtkWidget *widget, GdkEventExpose *event) #endif /* Chain up to get exposes on child widgets */ -#if !GTK_CHECK_VERSION(3,0,0) - GTK_WIDGET_CLASS (canvas_parent_class)->expose_event (widget, event); -#else +#if GTK_CHECK_VERSION(3,0,0) + cairo_restore (cr); + if (GTK_WIDGET_CLASS (canvas_parent_class)->draw) GTK_WIDGET_CLASS (canvas_parent_class)->draw (widget, cr); cairo_region_destroy (region); +#else + GTK_WIDGET_CLASS (canvas_parent_class)->expose_event (widget, event); #endif + return FALSE; } |