Improvement: Support reading _NET_WM_OPACITY from client windows
- Some WMs don't respect Keith Packard's proposal of _NET_WM_WINDOW_OPACITY, and do not copy _NET_WM_OPACITY attribute of a client window to its frame windows, thus cause opacity set by non-override-redirect windows to have no effect. This commit adds support for reading _NET_WM_OPACITY from client windows if running with --detect-client-opacity. Thanks to pvanek for reporting. - Change Makefile logic to determine options from 3 variables (NO_LIBCONFIG, NO_REGEX_PCRE, NO_REGEX_PCRE_JIT) instead of CFG to ensure compatibility when we add new options. CFG variable is no longer been respected.
This commit is contained in:
40
Makefile
40
Makefile
@ -4,20 +4,38 @@ PREFIX ?= /usr
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
MANDIR ?= $(PREFIX)/share/man/man1
|
||||
|
||||
PACKAGES = x11 xcomposite xfixes xdamage xrender xext libconfig
|
||||
LIBS = $(shell pkg-config --libs $(PACKAGES)) -lm
|
||||
LIBS += $(shell pcre-config --libs)
|
||||
INCS = $(shell pkg-config --cflags $(PACKAGES))
|
||||
INCS += $(shell pcre-config --cflags)
|
||||
PACKAGES = x11 xcomposite xfixes xdamage xrender xext
|
||||
LIBS = -lm
|
||||
INCS =
|
||||
|
||||
# Parse configuration flags
|
||||
CFG =
|
||||
|
||||
ifeq "$(NO_LIBCONFIG)" ""
|
||||
CFG += -DCONFIG_LIBCONFIG
|
||||
PACKAGES += libconfig
|
||||
|
||||
# libconfig-1.3* does not define LIBCONFIG_VER* macros, so we use
|
||||
# pkg-config to determine its version here
|
||||
CFG += $(shell pkg-config --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY')
|
||||
endif
|
||||
|
||||
ifeq "$(NO_REGEX_PCRE)" ""
|
||||
CFG += -DCONFIG_REGEX_PCRE
|
||||
LIBS += $(shell pcre-config --libs)
|
||||
INCS += $(shell pcre-config --cflags)
|
||||
ifeq "$(NO_REGEX_PCRE_JIT)" ""
|
||||
CFG += -DCONFIG_REGEX_PCRE_JIT
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS += $(CFG)
|
||||
|
||||
LIBS += $(shell pkg-config --libs $(PACKAGES))
|
||||
INCS += $(shell pkg-config --cflags $(PACKAGES))
|
||||
CFLAGS += -Wall -std=c99
|
||||
OBJS = compton.o
|
||||
|
||||
CFG ?= -DCONFIG_LIBCONFIG -DCONFIG_REGEX_PCRE -DCONFIG_REGEX_PCRE_JIT
|
||||
# libconfig-1.3* does not define LIBCONFIG_VER* macros, so we use pkg-config
|
||||
# to determine its version here
|
||||
CFG += $(shell pkg-config --atleast-version=1.4 libconfig || echo '-DCONFIG_LIBCONFIG_LEGACY')
|
||||
CFLAGS += $(CFG)
|
||||
|
||||
%.o: src/%.c src/%.h
|
||||
$(CC) $(CFLAGS) $(INCS) -c src/$*.c
|
||||
|
||||
|
Reference in New Issue
Block a user