Bugs:
* There seems to be a noticeable frame loss when window
is being opened/closed. But the same problem also exists
in master/next, so this is not a regression.
* Using --sw-opti and --benchmark at the same time causing
compton to draw more frequently than permitted by the
arguments. That is because the sleep interval calculation
is flawed. Not really a regression either.
Verified still working:
* Usual painting
* Fade
* Benchmark mode
* --sw-opti (with or without benchmark mode)
* DBus
* Unredir delay
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
No functional changes intended. The new xcb_damage_query_version() was
previously done by XDamageQueryExtension() internally.
Signed-off-by: Uli Schlachter <psychon@znc.in>
If an X event is received at a very specific point in time, it can trigger
a race condition in Xlib. Said event will be read, but Xlib will
nonetheless be completely unaware of the event.
This cause compton to sometimes block on select() while there are events
ready to be processed. If the event is a damage report, screen freeze
will happen until some other event is received.
The proper fix is to switch to xcb for event handling, thus avoid this
problem entirely.
Also move static function prototypes out of compton.h. Seems like the
previous developers didn't know what header files are for.
Seems to have bugs after the split.
Misc: Create directories for icons before installing them. This fixes
the install failure if the DESTDIR used when executing `make install`
does not contain the icon directories. It could appear when the user
does not wish to directly install the software to the system, like in
Gentoo ebuild or Arch Linux AUR building.
- Add --xrender-sync{,-fence} to deal with redraw lag issue on GLX
backend. --xrender-sync-fence requires a sufficiently new xorg-server
and libXext. NO_XSYNC=1 may be used to disable it at compile time.
Thanks to tchebb for reporting and everybody else for testing. (#181)
- A bit code clean-up. Replace a few XSync() with XFlush() to minimize
the latency.
Possible fix for a very rare timing issue in focus detection. Compton
may fail to detect the currently focused window, when a window newly
mapped gets focused, we failed to listen to events and get FocusIn from
it in time, and a series of focus change events before it happens stay
in the event queue and puzzled compton. My choice is to force focus
recheck on all focus-related events. More roundtrips to X, but not
necessarily worse performance, due to the high cost of focus flipping
especially when there's a lot of conditions. Thanks to SlackBox for
reporting. (#153)
- Add multipass blur support. Note GLX Framebuffer support is required.
My benchmark shows multipass blur brings 5% performance boost for X
Render backend (3x3box). On GLX backend it brings 10% performance
boost for 5x5box but negatively affects performance for 3x3box. Thanks
to jrfonseca for advice. (#107)
- GLX backend: Cache blur texture for each window, for a 12% performance
boost.
- Add D-Bus fading control. Thanks to yulan6248 for testing. (#112)
- Fix FAQ link in README.md. Thanks to lorenzos for report. (#111)
- Correctly deinitialize VSync on on-the-fly VSync method switch.
- X Render backend: Normalize blur kernel.
- Code clean-up.
- Known issue: Linear corruption on border of a window may appear with X
Render multi-pass blur. Possible to fix but probably not worthwhile.
- Add blur convolution kernel customization, --blur-kern. The format is
a bit tricky so be sure to read the description in `compton -h`. Not
much tests received.
- GLX backend: Tolerate missing GLSL uniforms for strangely shaped
convolution kernel.
- Fix a memory leak that blur-background blacklist is not freed.
- GLX backend: Add blur background support using a GLSL shader. Only
tested with nvidia-drivers-313.26. Known to cause quite some decrease
in performance (~10%?).
- Detach shaders in glx_create_program(). Misc changes.
- GLX backend: Use GL_SCISSOR_TEST instead of STENCIL_TEST if there's
only one rectangle in glx_set_clip(). Profiling with gDebugger shows a
10% performance improvement.
- Add .desktop installation rules. (#97)
- Fix a bug that glx_bind_pixmap() doesn't work with mesa drivers.
Thanks to Janhouse and mkraemer for reporting. (#7)
- Use stencil buffer to attempt to eliminate potential double-paint
issue in glx_render(). X Fixes doesn't guarantee the rectangles in a
region do not overlap, and this may cause some regions to be painted
twice, which would be a problem if we are painting transparent things.
Now the target window must have a stencil buffer. Compiz uses its own
region implementation to deal with this, but as a lightweight
compositor we can't really do the same. It may have a positive or
negative effort over performance. Callgrind result indicates basically
no change in performance, but this may or may not be true.
- Correctly distinguish GL extensions and GLX extensions. Sorry. :-D
- Handle screen size. Thanks to tsmithe for reporting. (#7)
- Rename OpenGL backend to GLX backend, because, we might have a EGL
backend someday.
- Add configuration file option `backend` to specify backend. Add
`backend` to D-Bus `opts_get`.
- Add OpenGL shader compilation code, but currently unused.
- Minor adjustments.
- Known issue: Window content doesn't get updated in VirtualBox,
probably because its OpenGL implementation requires constant rebinding
of texture. But that's really slow...
- Known issue: Blur feature is still unimplemented in GLX backend.
- Add experimental OpenGL backend (--opengl). --blur-background is
currently not possible with this backend, because I'm still trying to
find a proper way to do blur with OpenGL. Flipping backend on-the-fly
is really hard, so it isn't supported right now. No configuration file
option exists to enable this, because it isn't stable enough.
- Add `opengl-swc` VSync method that uses SGI_swap_control to control
buffer swap, with OpenGL backend. (#7)
- Fix a potential read-from-freed-memory issue in paint_all().
- Correctly reattach GLX context after fork.
- Dump error text in error(). Add GLX error code handling.
- Code clean-up.
- Known issues: Region operations take a lot of time in glx_render().
I'm hesitating about what to do.
- #91: Use pkg-config to find drm.h to avoid issues on FreeBSD. Thanks
to hun7err for pointing out and providing patch.
- #89: Add default shadow exclusion rule for notify-osd. Thanks to
DanielRS.
- Check for abundant positional arguments.
- Use paint target window (root window / overlay window) instead of
ps->reg_win to create GLXContext. (May have negative effects on OpenGL
VSync.) Add new OpenGL helpers functions, to prepare for the new
OpenGL backend.
- Dump more info of a PropertyNotify with DEBUG_EVENTS.
- Make Makefile compatible with BSD install, by dropping -D.
- Make CFG independent in Makefile, to allow people to specify CFLAGS
as a parameter to make.
- Correct location of .clang_complete.
- Add on-the-fly VSync option modification via D-Bus, as requested by
kunitoki (#80). Expose parse_vsync(), create vsync_init() and
ensure_glx_context().
- Change default value of ps->drm_fd to -1.
- Update Makefile. Change the install/uninstall rules and add doc
installation, requested by hasufell in #85.
- Mark window not damaged in map_win(). It helps in reducing flickering
with inverted window color, but I'm not completely sure if it's safe.
- Avoid modifying w->invert_color when window is unmapped.
- Update documentation. Thanks to hasufell for pointing out.
- Add "vsync-oml" VSync method, using GLX_OML_sync_control. Untested,
because it's not supported by my driver.
- Unredirect ps->reg_win, because DRI wiki says it's related to the
behavior of OpenGL VSync extensions.
- Add glFlush() and glXWaitX() calls, in hope they are slightly helpful
for VSync.
- Change a few functions to make error handling more graceful. Make some
errors fatal. Code clean-up.
- Add unused function make_text_prop().
- 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.
- Fix a bug that root window is not repainted on wallpaper change unless
an Expose X event is received. Seemingly, if there's no mapped window
on a screen, X will not send an Expose event when the wallpaper
changes. Thanks to baskerville for reporting.
- Fix a X Pixmap leak when there's no existing wallpaper pixmap found.
- Fix a bug in mstrncpy() that null character is not added to the end of
the copied string.
- Make VSYNC_STRS public, for use in src/dbus.c. Adjust the type of
WINTYPES array. Add NUM_VSYNC.
- Add more targets for various D-Bus methods. Add "bad_target" D-Bus
error. Improve error handling. Add more helper functions to append
arguments to a D-Bus message. Add Introspect method to D-Bus
introspection reply.
- Add public declarations of things in the new condition format code to
common.h. Move definitions of some inline functions from compton.h to
common.h. Make some functions public. Move wid_get_prop_adv() to
compton.c. The primary code files of the new format src/c2.{c,h} will
be published when ready.
- Add support for dumping version string in Makefile (make version), to
make snapshot generation easier.
- Add repeated inclusion protection to common.h.
- Update documentation.
- Use gsed instead of sed in dbus-examples/cdbus-driver.sh if possible,
as some BSD systems does not come with GNU sed by default. Thanks to
DaChiChang for reporting.
- Code clean-up. Small type changes in register_cm() to silence
warnings. Quit on failure in parse_vsync(). Apply stricter checks in
force_repaint().