summaryrefslogtreecommitdiffstats
path: root/compton.h
diff options
context:
space:
mode:
authorRichard Grenville <pyxlcy@gmail.com>2012-11-09 11:35:40 +0800
committerRichard Grenville <pyxlcy@gmail.com>2012-11-09 11:41:21 +0800
commit295bbf30c2cca975bcfd774fab61c3158ef460fc (patch)
tree2e5aca9d673b91644e7d2cd12e741a2a77ae3ec1 /compton.h
parentbaed7f4b0c211ea2ff04bf9e009ab6e334dad3e4 (diff)
downloadtdebase-295bbf30c2cca975bcfd774fab61c3158ef460fc.tar.gz
tdebase-295bbf30c2cca975bcfd774fab61c3158ef460fc.zip
Feature #16: _COMPTON_SHADOW window property support
- Add support for reading _COMPTON_SHADOW property from windows (--respect-attr-shadow). Presently the only defined behavior is, if _COMPTON_SHADOW is set on the highest ancestor below root window of a window (usually the WM frame), it's format is 32-bit, type is CADINAL, value is 0, the window will not get a shadow. The format and behavior could change in the future without prior notification. - Fix an issue in fork_after() that may cause some streams to remain open. My mistake. - Attempt to reduce determine_shadow() calls from map_win() by separating some raw handler functions out.
Diffstat (limited to 'compton.h')
-rw-r--r--compton.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/compton.h b/compton.h
index d7ec6a437..b7a9d66eb 100644
--- a/compton.h
+++ b/compton.h
@@ -318,6 +318,9 @@ typedef struct _win {
Picture shadow_pict;
/// Alpha mask Picture to render shadow. Affected by shadow opacity.
Picture shadow_alpha_pict;
+ /// The value of _COMPTON_SHADOW attribute of the window. Below 0 for
+ /// none.
+ long attr_shadow;
// Dim-related members
/// Whether the window is to be dimmed.
@@ -391,6 +394,8 @@ typedef struct _options {
wincond *shadow_blacklist;
/// Whether bounding-shaped window should be ignored.
Bool shadow_ignore_shaped;
+ /// Whether to respect _COMPTON_SHADOW.
+ Bool respect_attr_shadow;
// Fading
Bool wintype_fade[NUM_WINTYPES];
@@ -1064,9 +1069,18 @@ static void
determine_fade(Display *dpy, win *w);
static void
+win_update_shape_raw(Display *dpy, win *w);
+
+static void
win_update_shape(Display *dpy, win *w);
static void
+win_update_attr_shadow_raw(Display *dpy, win *w);
+
+static void
+win_update_attr_shadow(Display *dpy, win *w);
+
+static void
determine_shadow(Display *dpy, win *w);
static void