I think it looks a little silly that the shadows are drawn the same size on all edges of windows. This could only happen if the light source was directly in front of the screen. OS X's shadows look much more believable, being offset towards the bottom and giving the illusion that there is a light source towards the top of the screen. The fix is pretty easy. Just change lines 57 and 58 in compositor.c to the following: #define SHADOW_OFFSET_X (SHADOW_RADIUS * -1.5) #define SHADOW_OFFSET_Y (SHADOW_RADIUS * -.5) This gives a small shadow on the right and left sides that is the same size, no shadow on the top, and a larger shadow on the bottom of the window. Reproducible: Always Steps to Reproduce: 1. Run xfwm4 with the compositor enabled. Actual Results: Shadows are drawn the same size in all four directions. Expected Results: Shadows drawn with the bottom shadow being the biggest. The shadows on the right and left side should be the same size.
That was on purpose. BTW, there is already options to control the size of shadows on each size: shadow_delta_height=0 shadow_delta_width=0 shadow_delta_x=0 shadow_delta_y=0 You can play with these values in the themerc to get what you want.
Closing bug, I changed to shadow to get a mix of both solutions (knowing that it's customizable anyway)
Okay, I've done some tinkering with the themerc. In doing so, I found a related, yet easily fixed bug in settings.c that only let you shrink the size of the shadow to a size smaller than the size of the window. This made the shadow hide behind the window completely. It used an absolute value function on these values. Change lines 663 to 670 in settings.c to: screen_info->params->shadow_delta_x = (TOINT (getValue ("shadow_delta_x", rc)) * -1); screen_info->params->shadow_delta_y = (TOINT (getValue ("shadow_delta_y", rc)) * -1); screen_info->params->shadow_delta_width = (TOINT (getValue ("shadow_delta_width", rc)) * -1); screen_info->params->shadow_delta_height = (TOINT (getValue ("shadow_delta_height", rc)) * -1); This will change the behavior of the themerc a bit, but I think it makes more sense this way. shadow_delta_height = distance from the bottom edge of the window to the bottom edge of shadow shadow_delta_width = distance from the left edge shadow_delta_y = distance from top edge shadow_delta_x = distance from right edge Positive numbers will make the shadow extend beyond the edge of the window, while negative numbers will have the edge of the shadow hidden behind the window.
Created attachment 201 Patch for adding shadow settings to xfwm4 and its settings plugin I finally got around to writing a patch for changing the shadow settings. You can now use some sliders in xfwm4's mcs-plugin to change the geometry and opacity of the shadows in real time. These settings can be parsed in the xfwm4rc and can be saved by the session manager. Screenshot: http://members.cox.net/brian-schott/shadow_patch.png
This would be a cool addition to the Window manager tweaks! The patch was written against xfwm4-4.2.1, so I'd recon that it won't apply at all. Olivier, any change such a thing can be added to the 4.4+ xfwm4?
No, it's not been merged, the shadow geometry is a setting from the theme, it's not configurable by the user. I'm not sure about the "usefulness" of that feature, that's why it was left out. Actually, I always have a problem with rejecting a feature request with a patch, that's why I left it open, but I believe it adds bloats...
> Actually, I always have a problem with rejecting a feature request with a > patch, that's why I left it open, but I believe it adds bloats... > If you really see this as bloat, please close this bug...
(In reply to comment #5) > This would be a cool addition to the Window manager tweaks! > > The patch was written against xfwm4-4.2.1, so I'd recon that it won't apply at > all. > > Olivier, any change such a thing can be added to the 4.4+ xfwm4? > I'm sure it wouldn't apply. The thing that I was really concerned about was that absolute value function mentioned earlier. Everything I was complaining about seems to be fixed in 4.4, so I'll call this fixed if nobody minds.