Feature #16: Advanced window matching
- 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.
This commit is contained in:
13
Makefile
13
Makefile
@ -55,10 +55,10 @@ ifeq "$(NO_DBUS)" ""
|
||||
endif
|
||||
|
||||
# ==== C2 ====
|
||||
# ifeq "$(NO_C2)" ""
|
||||
# CFG += -DCONFIG_C2
|
||||
# OBJS += c2.o
|
||||
# endif
|
||||
ifeq "$(NO_C2)" ""
|
||||
CFG += -DCONFIG_C2
|
||||
OBJS += c2.o
|
||||
endif
|
||||
|
||||
# === Version string ===
|
||||
COMPTON_VERSION ?= git-$(shell git describe --always --dirty)-$(shell git log -1 --date=short --pretty=format:%cd)
|
||||
@ -78,6 +78,9 @@ MANPAGES_HTML = $(addsuffix .html,$(MANPAGES))
|
||||
# === Recipes ===
|
||||
.DEFAULT_GOAL := compton
|
||||
|
||||
.clang_complete: Makefile
|
||||
@(for i in $(filter-out -O% -DNDEBUG, $(CFLAGS) $(INCS)); do echo "$$i"; done) > $@
|
||||
|
||||
%.o: src/%.c src/%.h src/common.h
|
||||
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
||||
|
||||
@ -105,7 +108,7 @@ uninstall:
|
||||
@rm -f "$(DESTDIR)$(MANDIR)/compton-trans.1"
|
||||
|
||||
clean:
|
||||
@rm -f $(OBJS) compton $(MANPAGES) $(MANPAGES_HTML)
|
||||
@rm -f $(OBJS) compton $(MANPAGES) $(MANPAGES_HTML) .clang_complete
|
||||
|
||||
version:
|
||||
@echo "$(COMPTON_VERSION)"
|
||||
|
Reference in New Issue
Block a user