Used for setting custom window shaders and rules for choosing custom
window shaders.
Added a "c2_userdata_free" parameter to c2_list_free, so allocated userdata
stored in nodes can be freed.
Signed-off-by: Bernd Busse <bernd@busse-net.de>
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Currently compton handles window creation event by immediately query all
the information it needs and create a window struct with that
information. However, this is prone to race conditions.
In the future, we want to react to window creation event by creating a
placeholder in the window stack, and only query window information in a
critical section where the X server is grabbed by us.
This commit split struct win into two struct, one as placeholder, the
other for holding actual window information.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
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>
* Pass a options_t, not session_t
* Slightly improve error handling when setting vsync method via dbus
The goal here is to limit the scope of what a given function can access.
And session_t contains basically everything, so don't pass it around.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
IANAL, but I think I am allowed to add missing copyright notices for
someone else. And I did my best job using git history to figure out who
wrote which functions. So I hope everything is fine.
Add `bounding_shape` and `rounded_corners` as condition match target.
Deprecate --shadow-ignore-shaped. Add rounded-corners detection to
win_is_fullscreen(). Slightly modify win_rounded_corners() logic. Thanks
to tdryer for reporting. (#191)
- Add stoppaint_force option, controlled via D-Bus, to stop painting
completely, which may look better than unredirecting the screen,
sometimes. (#41)
- Add x2, y2 matching targets.
- Update documentation.
- Add --paint-exclude to prevent certain windows from being painted, for
debugging purposes.
- Add predefined matching target "x", "y", "width", "height", "widthb",
"heightb", "border_width", and "fullscreen".
- Fix bug #119, wrong man page install dir in CMake configuration.
Thanks to sstewartgallus for reporting.
- 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.
- Add advanced window matching system, capable of matching against
arbitrary window properties as well as a series of internal
properties, with 4 additional operators (>, <, >=, <=) useful for
integer targets, and support of logical operators. The old matching
system is removed, but compatibility with the format is retained.
- As the new matching system is pretty complicated, and I have no past
experience in writing a parser, it's pretty possible that bugs are
present. It also has inferior performance, but I hope it doesn't
matter on modern CPUs.
- It's possible to disable matching system at compile time with NO_C2=1
now.
- Add ps->o.config_file to track which config file we have actually
read. Queryable via D-Bus.
- Parse -d in first pass in get_cfg() as c2 needs to query X to get
atoms during condition parsing.
- Fix a bug in wid_get_prop_adv() that 0 == rformat is not handled
correctly.
- Fix incompatibility with FreeBSD sed in dbus-examples/cdbus-driver.sh
.
- Add recipe to generate .clang_complete in Makefile, used by Vim
clang_complete plugin.
- Add DEBUG_C2 for debugging condition string parsing. DEBUG_WINMATCH is
still used for match debugging.
- Rename win_on_wdata_change() to win_on_factor_change().
- Extra malloc() failure checks. Add const to matching cache members in
session_t. Code clean-up. Documentation update.