summaryrefslogtreecommitdiffstats
path: root/common.h
diff options
context:
space:
mode:
authorRichard Grenville <[email protected]>2013-05-21 09:18:41 +0800
committerRichard Grenville <[email protected]>2013-05-21 09:26:18 +0800
commitd800a62b878fa152c94253b2c0f60ef4f5b9b9d1 (patch)
treeed2ae824aee66bd3ec4adcd78cf6a93c2b94813b /common.h
parent1bdd035974a0166434cdb2dd5d34405d6ddf184d (diff)
downloadtdebase-d800a62b878fa152c94253b2c0f60ef4f5b9b9d1.tar.gz
tdebase-d800a62b878fa152c94253b2c0f60ef4f5b9b9d1.zip
Feature #113: Set opacity based on conditions
- Add --opacity-rule, which sets opacity based on conditions, as requested by zabbal. (#113) - Add a data field for each condition. - Correct the FAQ link in README.md. Silly me. - Code clean-up.
Diffstat (limited to 'common.h')
-rw-r--r--common.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/common.h b/common.h
index cab29f76a..0b97d5009 100644
--- a/common.h
+++ b/common.h
@@ -546,6 +546,8 @@ typedef struct {
bool inactive_dim_fixed;
/// Conditions of windows to have inverted colors.
c2_lptr_t *invert_color_list;
+ /// Rules to change window opacity.
+ c2_lptr_t *opacity_rules;
// === Focus related ===
/// Consider windows of specific types to be always focused.
@@ -921,6 +923,7 @@ typedef struct _win {
const c2_lptr_t *cache_fcblst;
const c2_lptr_t *cache_ivclst;
const c2_lptr_t *cache_bbblst;
+ const c2_lptr_t *cache_oparule;
// Opacity-related members
/// Current window opacity.
@@ -933,6 +936,8 @@ typedef struct _win {
/// broken window managers not transferring client window's
/// _NET_WM_OPACITY value
opacity_t opacity_prop_client;
+ /// Last window opacity value we set.
+ long opacity_set;
// Fading-related members
/// Do not fade if it's false. Change on window type change.
@@ -2027,14 +2032,20 @@ opts_set_no_fading_openclose(session_t *ps, bool newval);
///@{
c2_lptr_t *
-c2_parse(session_t *ps, c2_lptr_t **pcondlst, const char *pattern);
+c2_parsed(session_t *ps, c2_lptr_t **pcondlst, const char *pattern,
+ void *data);
+
+#define c2_parse(ps, pcondlst, pattern) c2_parsed((ps), (pcondlst), (pattern), NULL)
c2_lptr_t *
c2_free_lptr(c2_lptr_t *lp);
bool
-c2_match(session_t *ps, win *w, const c2_lptr_t *condlst,
- const c2_lptr_t **cache);
+c2_matchd(session_t *ps, win *w, const c2_lptr_t *condlst,
+ const c2_lptr_t **cache, void **pdata);
+
+#define c2_match(ps, w, condlst, cache) c2_matchd((ps), (w), (condlst), \
+ (cache), NULL)
#endif
///@}