]> git.lizzy.rs Git - bspwm.git/commitdiff
New setting: 'apply_shadow_property'
authorBastien Dejean <nihilhill@gmail.com>
Sat, 19 Jan 2013 19:53:46 +0000 (20:53 +0100)
committerBastien Dejean <nihilhill@gmail.com>
Sat, 19 Jan 2013 19:53:46 +0000 (20:53 +0100)
Will not have any effect unless `compton` is started with the
`--respect-prop-shadow` option.

README.md
bspwm.1
messages.c
settings.c
settings.h

index ddf4753db7ef6af22b326dfbae0bad0e220c3d50..a3f41d0a2a6a52872b63f548fe7609a460a47610 100644 (file)
--- a/README.md
+++ b/README.md
@@ -223,6 +223,8 @@ Colors are either [X color names](http://en.wikipedia.org/wiki/X11_color_names)
 
 - `adaptative_raise` — Prevent floating windows from being raised when they might cover other floating windows.
 
+- `apply_shadow_property` — Enable shadows for floating windows via the `_COMPTON_SHADOW` property.
+
 ## Key Features
 
 - Configured and controlled through messages
diff --git a/bspwm.1 b/bspwm.1
index 167bbd78f2dcaccdd1f212c9bf74d331d9a0672c..16c2d82ca465eee3ea99b1ffe5a12137fb1ff95f 100644 (file)
--- a/bspwm.1
+++ b/bspwm.1
@@ -341,6 +341,11 @@ Wether to focus the window under the pointer.
 .TP
 .I adaptative_raise
 Prevent floating windows from being raised when they might cover other floating windows.
+.TP
+.I apply_shadow_property
+Enable shadows for floating windows via the
+.B _COMPTON_SHADOW
+property.
 .SH AUTHOR
 .EX
 Bastien Dejean <baskerville at lavabit.com>
index 9105a315c54d81a62ac63f21cfbf1cc9970c6967..fab5fc9140238453d40d966a6631a5ad18e5203f 100644 (file)
@@ -511,6 +511,10 @@ void set_setting(char *name, char *value, char *rsp)
         bool b;
         if (parse_bool(value, &b))
             adaptative_raise = b;
+    } else if (strcmp(name, "apply_shadow_property") == 0) {
+        bool b;
+        if (parse_bool(value, &b))
+            apply_shadow_property = b;
     } else if (strcmp(name, "wm_name") == 0) {
         strncpy(wm_name, value, sizeof(wm_name));
         ewmh_update_wm_name();
@@ -574,6 +578,8 @@ void get_setting(char *name, char* rsp)
         snprintf(rsp, BUFSIZ, "%s", BOOLSTR(focus_follows_pointer));
     else if (strcmp(name, "adaptative_raise") == 0)
         snprintf(rsp, BUFSIZ, "%s", BOOLSTR(adaptative_raise));
+    else if (strcmp(name, "apply_shadow_property") == 0)
+        snprintf(rsp, BUFSIZ, "%s", BOOLSTR(apply_shadow_property));
     else if (strcmp(name, "wm_name") == 0)
         snprintf(rsp, BUFSIZ, "%s", wm_name);
     else
index 7a4b248481d893859818a5331e2849bb338e7ed3..1f5c3adef24b5034d93cff76241f6f5e8eb2a658 100644 (file)
@@ -67,4 +67,5 @@ void load_settings(void)
     gapless_monocle = GAPLESS_MONOCLE;
     focus_follows_pointer = FOCUS_FOLLOWS_POINTER;
     adaptative_raise = ADAPTATIVE_RAISE;
+    apply_shadow_property = APPLY_SHADOW_PROPERTY;
 }
index 6a144d57e9925bc0270e14e2b92937d9ba8cbd41..a2cddf9d4f1548ad6e7a4c040c6dc64d933bfed9 100644 (file)
@@ -28,6 +28,7 @@
 #define GAPLESS_MONOCLE        false
 #define FOCUS_FOLLOWS_POINTER  false
 #define ADAPTATIVE_RAISE       false
+#define APPLY_SHADOW_PROPERTY  false
 
 char focused_border_color[MAXLEN];
 char active_border_color[MAXLEN];
@@ -62,6 +63,7 @@ bool borderless_monocle;
 bool gapless_monocle;
 bool focus_follows_pointer;
 bool adaptative_raise;
+bool apply_shadow_property;
 
 char wm_name[MAXLEN];