[Wayland-bugs] [Bug 727452] Wayland windows with non-trivial alpha get new content drawn over old
gtk+ (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Apr 2 02:38:08 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=727452
gtk+ | Backend: Wayland | 3.12.x
--- Comment #8 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2014-04-02 09:38:04 UTC ---
(In reply to comment #5)
> Actually, all that should be unnecessary - try removing, well, all of it, and
> just changing the operator to CAIRO_OPERATOR_SOURCE (i.e. memcpy) before the
> cairo_fill().
I feel as though that ought to work, so I tried this patch, but it doesn't seem
to work:
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -3055,6 +3055,12 @@ gdk_window_clear_backing_region (GdkWindow *window,
cairo_region_intersect (clip, region);
gdk_cairo_region (cr, clip);
+ /* If the background pattern is not fully opaque, the default OVER operator
+ * would leave old content visible through the non-opaque regions. In
+ * practice the X11 backend is unaffected because it uses a new surface
+ * every time, but the Wayland backend is susceptible to this since
+ * it re-uses the same Cairo surface as much as possible (#727452). */
+ cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
cairo_fill (cr);
cairo_destroy (cr);
(In reply to comment #6)
> a testcase demonstrating the problem would be great
Sorry, I'm doing drive-by bugfixing in some code that is not currently public,
and I don't know enough about Wayland to construct a more minimal test case. I
believe drawing a GtkProgressBar in gtk_progress_bar_pulse() mode, on a
transparent toplevel window, would illustrate the bug?
The darkening drop-shadow that Kristian described sounds like it might well be
another symptom of the same thing. Kristian, does Attachment #273425 fix that
for you?
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Wayland-bugs
mailing list