Commit Graph

6 Commits

Author SHA1 Message Date
Yuxuan Shui a826e0ce79
Window state tracking refactor
Window state tracking is basically the back bond of window fading. We
add a new enum field to the win struct to track the state of the window,
instead of using a set of boolean variables. We also remove the fading
callbacks, since it is only used for fading, so the potential of code
reuse is lost. And it makes the code slightly harder to understand.

Also fixed a problem that --no-fading-openclose is not behaving as
advertised (from my observation, enabling this flag disables fading
entirely, instead of just diabling it for open/close).

Also uses double for opacity everywhere internally. Use opacity_t only
when setting X opacity prop.

TODO: Remove win::*_last

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-17 16:37:28 +00:00
Yuxuan Shui 60aa36b7af
Failure of config file parsing is a hard failure
compton will now quit if it fails to parse the config file.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2019-02-13 02:05:01 +00:00
Yuxuan Shui 4040ad259d
Add compiler dependent macros for thread_local
Also add stdc-predef.h because __STDC_NO_THREADS__ is defined there.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-20 00:46:38 +00:00
Yuxuan Shui 5f57cb41f9
A bit more compiler dependent macros
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-19 20:36:05 +00:00
Yuxuan Shui 68873efaa2
Move likely/unlikely to compiler.h
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 19:14:01 +00:00
Yuxuan Shui b8912fa749
Use checked allocation everywhere
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
2018-12-15 18:57:46 +00:00