GNOME Bugzilla – Bug 505333
Shadows are shown on minimize and switch rectangles
Last modified: 2008-03-18 23:50:01 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.
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.)
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.
Are the animated/switching windows marked as shaped, then?
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.
Created attachment 106913 [details] [review] Updated patch This patch checks for shape before checking for frame, which fixes the xeyes problem.
Created attachment 106938 [details] Either a demonstration of the problem with shaped windows, or a bear having a gloomy day
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.
Hm, that looks good to me, I wonder why I forgot about that case...commit away.
In it goes. The bear is now happy. http://svn.gnome.org/viewvc/metacity?rev=3648&view=rev
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?
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.