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 316871 - holes in shaped windows now block expose events
holes in shaped windows now block expose events
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: X11
2.8.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-21 19:38 UTC by Dan Winship
Modified: 2011-02-04 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtk-demo (2.6 or 2.8) patch to demonstrate the bug (1.83 KB, patch)
2005-09-21 19:39 UTC, Dan Winship
none Details | Review
proposed fix (2.35 KB, patch)
2005-09-26 20:19 UTC, Matthias Clasen
none Details | Review

Description Dan Winship 2005-09-21 19:38:24 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).
Comment 1 Dan Winship 2005-09-21 19:39:06 UTC
Created attachment 52477 [details] [review]
gtk-demo (2.6 or 2.8) patch to demonstrate the bug
Comment 2 Matthias Clasen 2005-09-26 20:19:54 UTC
Created attachment 52699 [details] [review]
proposed fix
Comment 3 Matthias Clasen 2005-09-26 20:28:51 UTC
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.
Comment 4 Tor Lillqvist 2005-09-26 21:01:06 UTC
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.