GNOME Bugzilla – Bug 316871
holes in shaped windows now block expose events
Last modified: 2011-02-04 16:19:21 UTC
Version details: 2.8.3 Distribution/Version: SUSE 10-ish In gtk+ 2.6, widgets that were under the "holes" in a shaped window would receive expose events normally. In 2.8, the holes are treated like they were opaque, and widgets don't receive expose events for the regions under them. Eg, apply the attached patch to gtk-demo and run the "Images" demo. The patch adds a completely transparent shaped window over most of the animated GIF. In 2.6, the animation is still displayed normally, but in 2.8, the part of the animation under the shaped window never changes, so only the pinky finger waves (and if you click the "Insensitive" button, only the outer edge of the image is desensitized).
Created attachment 52477 [details] [review] gtk-demo (2.6 or 2.8) patch to demonstrate the bug
Created attachment 52699 [details] [review] proposed fix
2005-09-26 Matthias Clasen <mclasen@redhat.com> Fix #316871, reported by Dan Winship: * gdk/gdkwindow.h (struct _GdkWindowObject): Add a shaped flag. * gdk/x11/gdkwindow-x11.c (gdk_window_shape_combine_mask) (gdk_window_shape_combine_region): Set it here. * gdk/gdkwindow.c (gdk_window_invalidate_maybe_recurse): Don't remove the child area for shaped windows.
Corresponding patch applied to the Win32 backend, too: 2005-09-26 Tor Lillqvist <tml@novell.com> * gdk/win32/gdkwindow-win32.c (gdk_window_shape_combine_mask): Set the shaped flag here, too. (#316871) (gdk_window_shape_combine_region): Currently unimplemented, so don't do anything to the shaped flag here. Hmm, I wonder how important that ..._combine_region() function is.