After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725172 - GdkWindow: fix redraws for backends that keep the same backing cairo surface
GdkWindow: fix redraws for backends that keep the same backing cairo surface
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-02-25 21:25 UTC by Giovanni Campagna
Modified: 2014-02-25 23:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
pixbuf-demo: don't lock the window size (981 bytes, patch)
2014-02-25 21:25 UTC, Giovanni Campagna
committed Details | Review
GdkWindow: fix redraws for backends that keep the same backing cairo surface (1.91 KB, patch)
2014-02-25 21:25 UTC, Giovanni Campagna
none Details | Review
Gdk: fix wrong user_data handling in resize_cairo_surface() (7.37 KB, patch)
2014-02-25 23:03 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2014-02-25 21:25:29 UTC
See patches.
Fixes Gtk+ windows getting stuck in mutter-wayland (and maybe weston --pixman
too).
Comment 1 Giovanni Campagna 2014-02-25 21:25:32 UTC
Created attachment 270326 [details] [review]
pixbuf-demo: don't lock the window size

What's the use of an animation demo, if you can interactively
resize it and show off how cool is your window system handling
updates?
Comment 2 Giovanni Campagna 2014-02-25 21:25:37 UTC
Created attachment 270327 [details] [review]
GdkWindow: fix redraws for backends that keep the same backing cairo surface

If gdk_window_create_cairo_surface() returns a surface that was
already used in the past as cairo surface (as it happens for
toplevel gdkwayland windows, whose cairo surface is the shm
image), setting a user data calls the destructor for the existing
user data, which clears window->cairo_surface, effectively nullifying
the effect of ref_cairo_surface(), which then returns NULL.
Comment 3 Matthias Clasen 2014-02-25 21:28:25 UTC
Review of attachment 270326 [details] [review]:

sure
Comment 4 Giovanni Campagna 2014-02-25 23:03:55 UTC
Created attachment 270333 [details] [review]
Gdk: fix wrong user_data handling in resize_cairo_surface()

Instead of destroying the surface in the backend if this is
unable to resize, let the core code do it, and do it properly.

Based on a patch by Benjamin Otte.
Comment 5 Giovanni Campagna 2014-02-25 23:04:55 UTC
Attachment 270326 [details] pushed as d5196de - pixbuf-demo: don't lock the window size
Attachment 270333 [details] pushed as ad2f96f - Gdk: fix wrong user_data handling in resize_cairo_surface()