summaryrefslogtreecommitdiffstats
path: root/twin
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2014-11-17 22:36:55 -0600
committerTimothy Pearson <[email protected]>2014-11-17 22:36:55 -0600
commitce4f259946672ba5243c195b479ca3b3f1421a83 (patch)
treefe71f9106870b3114210d53bd4a8d3115f6842d3 /twin
parenta4f1031a6d9555e614f1c3a24d2db18b0acd734f (diff)
downloadtdebase-ce4f259946672ba5243c195b479ca3b3f1421a83.tar.gz
tdebase-ce4f259946672ba5243c195b479ca3b3f1421a83.zip
Bring shadow size and location in line with TDE's original xcompmgr compositor
Diffstat (limited to 'twin')
-rw-r--r--twin/compton-tde/compton.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/twin/compton-tde/compton.c b/twin/compton-tde/compton.c
index 375a95630..76cbb1838 100644
--- a/twin/compton-tde/compton.c
+++ b/twin/compton-tde/compton.c
@@ -3006,8 +3006,9 @@ calc_win_size(session_t *ps, win *w) {
*/
static void
calc_shadow_geometry(session_t *ps, win *w) {
- w->shadow_dx = ps->o.shadow_offset_x * w->shadow_size;
- w->shadow_dy = ps->o.shadow_offset_y * w->shadow_size;
+ static const int shadowRadius = 100;
+ w->shadow_dx = (((- ps->o.shadow_radius * 7 / 5) - ps->o.shadow_offset_x * shadowRadius / 100) * w->shadow_size) / 100;
+ w->shadow_dy = (((- ps->o.shadow_radius * 7 / 5) - ps->o.shadow_offset_y * shadowRadius / 100) * w->shadow_size) / 100;
w->shadow_width = w->widthb + ps->gaussian_map->size;
w->shadow_height = w->heightb + ps->gaussian_map->size;
}
@@ -6065,7 +6066,7 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
for (i = 0; i < NUM_WINTYPES; ++i) {
ps->o.wintype_fade[i] = false;
- ps->o.wintype_shadow[i] = false;
+ ps->o.wintype_shadow[i] = true;
ps->o.wintype_opacity[i] = 1.0;
}
@@ -7269,8 +7270,8 @@ session_init(session_t *ps_old, int argc, char **argv) {
.shadow_green = 0.0,
.shadow_blue = 0.0,
.shadow_radius = 12,
- .shadow_offset_x = -15,
- .shadow_offset_y = -15,
+ .shadow_offset_x = 0,
+ .shadow_offset_y = 0,
.shadow_opacity = .75,
.clear_shadow = false,
.shadow_blacklist = NULL,