From f202223572ee4b01db95bdfb3b43f14e542d8eb8 Mon Sep 17 00:00:00 2001 From: Richard Grenville Date: Tue, 24 Sep 2013 20:41:50 +0800 Subject: [PATCH] Misc: Add cfg file options for --unredir-if-possible-* Add configuration file options for --unredir-if-possible-{delay,exclude}. (#140) --- compton.sample.conf | 2 ++ src/compton.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/compton.sample.conf b/compton.sample.conf index 8f3db47c..d1417547 100644 --- a/compton.sample.conf +++ b/compton.sample.conf @@ -54,6 +54,8 @@ dbe = false; paint-on-overlay = true; # sw-opti = true; # unredir-if-possible = true; +# unredir-if-possible-delay = 5000; +# unredir-if-possible-exclude = [ ]; focus-exclude = [ "class_g = 'Cairo-clock'" ]; detect-transient = true; detect-client-leader = true; diff --git a/src/compton.c b/src/compton.c index 511083c1..76a1c75c 100644 --- a/src/compton.c +++ b/src/compton.c @@ -5192,6 +5192,9 @@ parse_config(session_t *ps, struct options_tmp *pcfgtmp) { // --unredir-if-possible lcfg_lookup_bool(&cfg, "unredir-if-possible", &ps->o.unredir_if_possible); + // --unredir-if-possible-delay + if (lcfg_lookup_int(&cfg, "unredir-if-possible-delay", &ival)) + ps->o.unredir_if_possible_delay = ival; // --inactive-dim-fixed lcfg_lookup_bool(&cfg, "inactive-dim-fixed", &ps->o.inactive_dim_fixed); // --detect-transient @@ -5211,6 +5214,8 @@ parse_config(session_t *ps, struct options_tmp *pcfgtmp) { parse_cfg_condlst(ps, &cfg, &ps->o.blur_background_blacklist, "blur-background-exclude"); // --opacity-rule parse_cfg_condlst(ps, &cfg, &ps->o.opacity_rules, "opacity-rule"); + // --unredir-if-possible-exclude + parse_cfg_condlst(ps, &cfg, &ps->o.unredir_if_possible_blacklist, "unredir-if-possible-exclude"); // --blur-background lcfg_lookup_bool(&cfg, "blur-background", &ps->o.blur_background); // --blur-background-frame