diff options
author | Richard Grenville <pyxlcy@gmail.com> | 2012-09-11 21:57:50 +0800 |
---|---|---|
committer | Richard Grenville <pyxlcy@gmail.com> | 2012-09-11 21:57:50 +0800 |
commit | bbf35f81556f3309b320705db1cd98830b4cf552 (patch) | |
tree | b481a6015b737e6bee616ac7acd06d8a1e5f59cb /compton.h | |
parent | f7bf27f8380cda8c8c27cbfa19c9a656d638b39a (diff) | |
download | tdebase-bbf35f81556f3309b320705db1cd98830b4cf552.tar.gz tdebase-bbf35f81556f3309b320705db1cd98830b4cf552.zip |
Feature: Issue #35, Add colored shadows
- Use getopt_long() instead of getopt() for argument parsing, making
long options possible.
- Add support of colored shadows with 3 commandline switches.
Diffstat (limited to 'compton.h')
-rw-r--r-- | compton.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -131,6 +131,18 @@ extern int root_height, root_width; * Functions */ +// inline functions must be made static to compile correctly under clang: +// http://clang.llvm.org/compatibility.html#inline + +static inline double normalize_d(double d) { + if (d > 1.0) + return 1.0; + if (d < 0.0) + return 0.0; + + return d; +} + static int get_time_in_milliseconds(); |