Skip to content

Commit

Permalink
Feature: Issue #29: Alternative shadow blacklist implementation
Browse files Browse the repository at this point in the history
- Add shadow blacklist feature, but a different implementation from
  nicklan's. 5 matching modes (exact, starts-with, contains, wildcard,
  PCRE) and 3 matching targets (window name, window class instance,
  window general class). Not extensively tested, bugs to be expected.
  It's slower for exact matching than nicklan's as it uses linear search
  instead of hash table. Also, PCRE's JIT optimization may cause issues
  on PaX kernels.

- Add dependency to libpcre. Could be made optional if we have a
  graceful way to handle that in Makefile.

- Some matching functions are GNU extensions of glibc. So this version
  may have troubles running on platforms not using glibc.

- Fix a bug that access freed memory blocks in set_fade_callcack() and
  check_fade_fin(). valgrind found it out.

- Use WM_CLASS to detect client windows instead of WM_STATE. Some client
  windows (like notification windows) have WM_CLASS but not WM_STATE.

- Mark the extents as damaged if shadow state changed in
  determine_shadow().

- Rewrite wid_get_name(). Code clean-up.

- Two debugging options: DEBUG_WINDATA and DEBUG_WINMATCH.

- As the matching system is ready, it should be rather easy to add other
  kinds of blacklists, like fading blacklist.
  • Loading branch information
richardgv committed Sep 22, 2012
1 parent 8724101 commit 0d67243
Show file tree
Hide file tree
Showing 4 changed files with 572 additions and 77 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ MANDIR ?= $(PREFIX)/share/man/man1

PACKAGES = x11 xcomposite xfixes xdamage xrender xext
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
LIBS += $(shell pcre-config --libs)
INCS = $(shell pkg-config --cflags $(PACKAGES))
CFLAGS += -Wall
INCS += $(shell pcre-config --cflags)
CFLAGS += -Wall -std=c99
OBJS = compton.o

%.o: src/%.c src/%.h
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ __R__ for runtime
* xproto / x11proto (B)
* bash (R)
* xprop,xwininfo / x11-utils (R)
* libpcre (B,R) (Will probably be made optional soon)

To build, make sure you have the above dependencies:

Expand Down
Loading

0 comments on commit 0d67243

Please sign in to comment.