Bug fix #77 incorrect border_width handling & #73 window data issue

- (Hopefully) fix all incorrect handling of w->a.border_width in compton
  (#77). Thanks to baskerville for reporting.

- Attempt to fix #73 by correcting a mistake that window data is fetched
  from the wrong function. Thanks to zakkak.

- Add git commit/tag detection to Makefile for automatic versioning.

- Change -lGL linking order, to fix a segmentation fault caused by
  something in nvidia-drivers under FreeBSD, mentioned in #74. Thanks
  for the report from DachiChang.

- Link to -levent_core instead of -levent in Makefile. We might move to
  libev soon, though.

- Increase SWOPTI_TOLERANCE to handle the extraordinary delay of
  kqueue() under FreeBSD. Thanks for DachiChang's report.

- Add helper function dump_drawable() for debugging.

- Replace XInternAtom() calls with get_atom().

- Remove -lrt as it's unneeded.
This commit is contained in:
Richard Grenville
2013-01-09 20:25:01 +08:00
parent 3521f10a97
commit 7188054825
3 changed files with 87 additions and 68 deletions

View File

@ -8,7 +8,7 @@ BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man/man1
PACKAGES = x11 xcomposite xfixes xdamage xrender xext xrandr
LIBS = -lm -lrt
LIBS = -lm
INCS =
# === Configuration flags ===
@ -22,11 +22,11 @@ ifeq "$(shell pkg-config --modversion --print-errors libevent)" ""
CFG += -DCONFIG_LIBEVENT_LEGACY
LIBS += -levent
else
# Using pkg-config for linking with libevent will result in linking with
# libevent.so instead of the smaller libevent_core.so. But FreeBSD keeps
# libevent2 .so files at a separate place, and we must learn it from
# pkg-config.
LIBS += $(shell pkg-config --libs libevent)
# Using pkg-config --libs for linking with libevent will result in
# linking with libevent.so instead of the smaller libevent_core.so.
# FreeBSD keeps libevent2 .so files at a separate place, and we must
# learn it from pkg-config.
LIBS += $(shell pkg-config --libs-only-L libevent) -levent_core
INCS += $(shell pkg-config --cflags libevent)
endif
@ -58,7 +58,7 @@ endif
# ==== OpenGL VSync ====
ifeq "$(NO_VSYNC_OPENGL)" ""
CFG += -DCONFIG_VSYNC_OPENGL
LIBS += -lGL
LIBS := -lGL $(LIBS)
endif
# ==== D-Bus ====
@ -68,7 +68,7 @@ endif
# endif
# === Version string ===
COMPTON_VERSION ?= git-$(shell git describe --always)
COMPTON_VERSION ?= git-$(shell git describe --always --dirty)-$(shell git log -1 --date=short --pretty=format:%cd)
CFG += -DCOMPTON_VERSION="\"$(COMPTON_VERSION)\""
LDFLAGS ?= -Wl,-O1 -Wl,--as-needed