big shadows mac like for compiz

Bug #1710488 reported by gianluca.pettinello
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Compiz
New
Undecided
Unassigned

Bug Description

I'm using compiz as wm for xfce. I have a retina screen. Shadow radius can't be increase beyond 18px which is too little for an effect like mac osx.
For those who are interested in getting this effect attached a patch which I wrote.
I don't know how to submit it but it would be nice to have, I think
Cheers
Gianluca

diff -Nur ./compiz-0.9.13.1/gtk/window-decorator/gwd-settings.c ./compiz-0.9.13.1.patched/gtk/window-decorator/gwd-settings.c
--- compiz-0.9.13.1/gtk/window-decorator/gwd-settings.c 2016-11-11 17:20:40.000000000 +0100
+++ compiz-0.9.13.1.patched/gtk/window-decorator/gwd-settings.c 2017-08-13 10:33:17.463000954 +0200
@@ -29,16 +29,16 @@

 const gboolean USE_TOOLTIPS_DEFAULT = FALSE;

-const gdouble ACTIVE_SHADOW_RADIUS_DEFAULT = 8.0;
-const gdouble ACTIVE_SHADOW_OPACITY_DEFAULT = 0.5;
+const gdouble ACTIVE_SHADOW_RADIUS_DEFAULT = 75.0;
+const gdouble ACTIVE_SHADOW_OPACITY_DEFAULT = 0.35;
 const gint ACTIVE_SHADOW_OFFSET_X_DEFAULT = 1;
-const gint ACTIVE_SHADOW_OFFSET_Y_DEFAULT = 1;
+const gint ACTIVE_SHADOW_OFFSET_Y_DEFAULT = 25;
 const gchar *ACTIVE_SHADOW_COLOR_DEFAULT = "#00000000";

-const gdouble INACTIVE_SHADOW_RADIUS_DEFAULT = 8.0;
-const gdouble INACTIVE_SHADOW_OPACITY_DEFAULT = 0.5;
+const gdouble INACTIVE_SHADOW_RADIUS_DEFAULT = 75.0;
+const gdouble INACTIVE_SHADOW_OPACITY_DEFAULT = 0.35;
 const gint INACTIVE_SHADOW_OFFSET_X_DEFAULT = 1;
-const gint INACTIVE_SHADOW_OFFSET_Y_DEFAULT = 1;
+const gint INACTIVE_SHADOW_OFFSET_Y_DEFAULT = 25;
 const gchar *INACTIVE_SHADOW_COLOR_DEFAULT = "#00000000";

 const gint BLUR_TYPE_DEFAULT = BLUR_TYPE_NONE;
diff -Nur ./compiz-0.9.13.1/gtk/window-decorator/gwd-settings-xproperty-storage.c ./compiz-0.9.13.1.patched/gtk/window-decorator/gwd-settings-xproperty-storage.c
--- compiz-0.9.13.1/gtk/window-decorator/gwd-settings-xproperty-storage.c 2016-11-11 17:20:40.000000000 +0100
+++ compiz-0.9.13.1.patched/gtk/window-decorator/gwd-settings-xproperty-storage.c 2017-08-13 10:32:37.069665820 +0200
@@ -201,14 +201,14 @@
     }

     return gwd_settings_shadow_property_changed (storage->settings,
- (gdouble) MAX (0.0, MIN (aradius, 48.0)),
+ (gdouble) MAX (0.0, MIN (aradius, 120.0)),
                                                  (gdouble) MAX (0.0, MIN (aopacity, 6.0)),
- (gdouble) MAX (-16, MIN (ax_off, 16)),
- (gdouble) MAX (-16, MIN (ay_off, 16)),
+ (gdouble) MAX (-30, MIN (ax_off, 30)),
+ (gdouble) MAX (-30, MIN (ay_off, 30)),
                                                  active_shadow_color,
- (gdouble) MAX (0.0, MIN (iradius, 48.0)),
+ (gdouble) MAX (0.0, MIN (iradius, 120.0)),
                                                  (gdouble) MAX (0.0, MIN (iopacity, 6.0)),
- (gdouble) MAX (-16, MIN (ix_off, 16)),
- (gdouble) MAX (-16, MIN (iy_off, 16)),
+ (gdouble) MAX (-30, MIN (ix_off, 30)),
+ (gdouble) MAX (-30, MIN (iy_off, 30)),
                                                  inactive_shadow_color);
 }
diff -Nur ./compiz-0.9.13.1/plugins/decor/decor.xml.in ./compiz-0.9.13.1.patched/plugins/decor/decor.xml.in
--- compiz-0.9.13.1/plugins/decor/decor.xml.in 2017-08-13 10:28:41.729655355 +0200
+++ compiz-0.9.13.1.patched/plugins/decor/decor.xml.in 2017-08-13 10:31:10.646328644 +0200
@@ -23,9 +23,9 @@
   <option name="active_shadow_radius" type="float">
       <_short>Shadow Radius</_short>
       <_long>Drop shadow radius</_long>
- <default>8.0</default>
+ <default>75.0</default>
       <min>0.1</min>
- <max>18.0</max>
+ <max>120.0</max>
       <precision>0.1</precision>
   </option>
   <option name="active_shadow_opacity" type="float">
@@ -50,15 +50,15 @@
       <_short>Shadow Offset X</_short>
       <_long>Drop shadow X offset</_long>
       <default>1</default>
- <min>-16</min>
- <max>16</max>
+ <min>-30</min>
+ <max>30</max>
   </option>
   <option name="active_shadow_y_offset" type="int">
       <_short>Shadow Offset Y</_short>
       <_long>Drop shadow Y offset</_long>
- <default>1</default>
- <min>-16</min>
- <max>16</max>
+ <default>25</default>
+ <min>-30</min>
+ <max>30</max>
   </option>
      </subgroup>
      <subgroup>
@@ -66,9 +66,9 @@
   <option name="inactive_shadow_radius" type="float">
       <_short>Shadow Radius</_short>
       <_long>Drop shadow radius</_long>
- <default>8.0</default>
+ <default>75.0</default>
       <min>0.1</min>
- <max>13.0</max>
+ <max>120.0</max>
       <precision>0.1</precision>
   </option>
   <option name="inactive_shadow_opacity" type="float">
@@ -87,15 +87,15 @@
       <_short>Shadow Offset X</_short>
       <_long>Drop shadow X offset</_long>
       <default>1</default>
- <min>-16</min>
- <max>16</max>
+ <min>-30</min>
+ <max>30</max>
   </option>
   <option name="inactive_shadow_y_offset" type="int">
       <_short>Shadow Offset Y</_short>
       <_long>Drop shadow Y offset</_long>
- <default>1</default>
- <min>-16</min>
- <max>16</max>
+ <default>25</default>
+ <min>-30</min>
+ <max>30</max>
   </option>
      </subgroup>
      <option name="command" type="string">
diff -Nur ./compiz-0.9.13.1/plugins/decor/src/decor.cpp ./compiz-0.9.13.1.patched/plugins/decor/src/decor.cpp
--- compiz-0.9.13.1/plugins/decor/src/decor.cpp 2016-11-11 17:20:40.000000000 +0100
+++ compiz-0.9.13.1.patched/plugins/decor/src/decor.cpp 2017-08-13 10:31:43.232996761 +0200
@@ -3035,7 +3035,7 @@
        0,
        screen->root (),
        NULL)),
- mMenusClipGroup (CompMatch ("type=Dock | type=DropdownMenu | type=PopupMenu")),
+ mMenusClipGroup (CompMatch ("type=Dock")),
     mRequestor (screen->dpy (), screen->root (), &(decor[DECOR_ACTIVE])),
     mReleasePool (new PixmapReleasePool (
         boost::bind (XFreePixmap,

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.