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 505333 - Shadows are shown on minimize and switch rectangles
Shadows are shown on minimize and switch rectangles
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: Iain's compositor
trunk
Other Linux
: Normal minor
: ---
Assigned To: iain
Metacity compositor maintainers
Depends on:
Blocks:
 
 
Reported: 2007-12-24 00:54 UTC by Josh Lee
Modified: 2008-03-18 23:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Don't show shadows on shaped windows (449 bytes, patch)
2007-12-27 20:20 UTC, Josh Lee
none Details | Review
Updated patch (545 bytes, patch)
2008-03-09 15:56 UTC, Josh Lee
committed Details | Review
Either a demonstration of the problem with shaped windows, or a bear having a gloomy day (68.38 KB, image/png)
2008-03-10 00:45 UTC, Thomas Thurman
  Details

Description Josh Lee 2007-12-24 00:54:17 UTC
I'm using metacity trunk with the compositor switched on. When switching windows with alt+tab, and when minimizing a window, the rectangles that pop up have drop shadows. In the case of alt+tab, the shadow appears to darken the window, which is in fact the opposite of the desired effect of highlighting it. In the case of minimizing a window, it appears that a solid black rectangle is zooming to the taskbar, which looks strange. I think it would be better for metacity not to put shadows on its zoomrects.
Comment 1 Josh Lee 2007-12-27 20:20:52 UTC
Created attachment 101695 [details] [review]
Don't show shadows on shaped windows

This patch adds another case to window_has_shadow in core/compositor.c, with the effect of not shadowing either type of zoomrect.

(For some reason, xeyes still has a shadow, which confuses me.)
Comment 2 Josh Lee 2007-12-27 20:39:08 UTC
Oops, I forgot that xeyes has a frame. Maybe the shaped windows check should happen before the frame check, as it looks a little weird to see drop shadows under empty space in a window.
Comment 3 Thomas Thurman 2008-03-09 02:27:03 UTC
Are the animated/switching windows marked as shaped, then?
Comment 4 Josh Lee 2008-03-09 15:56:04 UTC
Yes, they are, and applying this patch prevents shadows from appearing on them.

Incidentally, when compiz is presented with the xeyes window, it puts a drop shadow around the border, but not behind the background.
Comment 5 Josh Lee 2008-03-09 15:56:55 UTC
Created attachment 106913 [details] [review]
Updated patch

This patch checks for shape before checking for frame, which fixes the xeyes problem.
Comment 6 Thomas Thurman 2008-03-10 00:45:37 UTC
Created attachment 106938 [details]
Either a demonstration of the problem with shaped windows, or a bear having a gloomy day
Comment 7 Thomas Thurman 2008-03-10 00:49:40 UTC
I can confirm that this patch makes the bear shown above happy again.  It also removes all darkening of windows when you tab through them, though, and I'd rather thought the darkening effect was intentional.  I'd like to check with Iain before I commit this.
Comment 8 iain 2008-03-10 13:47:15 UTC
Hm, that looks good to me, I wonder why I forgot about that case...commit away.
Comment 9 Thomas Thurman 2008-03-10 13:53:27 UTC
In it goes.  The bear is now happy.

http://svn.gnome.org/viewvc/metacity?rev=3648&view=rev
Comment 10 iain 2008-03-18 23:46:52 UTC
So, the problem with checking for shaped before checking for frame is that no framed window gets a drop shadow, which means that windows in themes with round corners don't get shadows.

I think I undid this patch in a recent commit, we may have to be more clever than just checking for shape or frame.

I guess the bear is unhappy again?
Comment 11 iain 2008-03-18 23:50:01 UTC
However, there is still is not a drop shadow on the minimise and switch rectangles, so actually this bug can be closed again. I'm sorry, I suck.

Xeyes is still broken, but I would consider it a broken application given that it has internally shaped windows and a frame.