2011-11-05 02:52:05 +08:00
# Compton
__Compton__ is a compositor for X, and a fork of __xcompmgr-dana__ .
I was frustrated by the low amount of standalone lightweight compositors.
Compton was forked from Dana Jansens' fork of xcompmgr and refactored. I fixed
whatever bug I found, and added features I wanted. Things seem stable, but don't
quote me on it. I will most likely be actively working on this until I get the
features I want. This is also a learning experience for me. That is, I'm
partially doing this out of a desire to learn Xlib.
## Changes from xcompmgr:
2013-03-21 13:05:56 +08:00
* OpenGL backend (`--backend glx`), in addition to the old X Render backend.
2013-05-01 22:08:43 +08:00
* Inactive window transparency (`-i`) / dimming (`--inactive-dim`).
* Titlebar/frame transparency (`-e`).
* Menu transparency (`-m`, thanks to Dana).
2011-11-05 02:52:05 +08:00
* shadows are now enabled for argb windows, e.g. terminals with transparency
* removed serverside shadows (and simple compositing) to clean the code,
the only option that remains is clientside shadows
Feature #80: D-Bus support
- Add D-Bus support. Currently 7 methods are available: "reset" (same as
SIGUSR1), "list_win" (list the windows compton manages), "win_get"
(get a property of the window), "win_set" (set a property of the
window), "find_win" (find window based on client window / focus),
"opts_get" (get the value of a compton option), and "opts_set" (set
the value of a compton option), together with 4 signals: "win_added",
"win_destroyed", "win_mapped", "win_unmapped".
- D-Bus support depends on libdbus.
- As there are many items and my time is tight, no much tests are done.
Bugs to be expected.
- Create a new header file `common.h` that contains shared content.
- Fix some bugs in timeout handling.
- Update file headers in all source files.
- Re-enable --unredir-if-possible on multi-screen set-ups, as the user
could turn if off manually anyway.
- Check if the window is mapped in `repair_win()`.
- Add ps->track_atom_lst and its handlers, to prepare for the new
condition format.
- Known issue 1: "win_get", "win_set", "opts_get", "opts_set" support a
very limited number of targets only. New ones will be added gradually.
- Known issue 2: Accidental drop of D-Bus connection is not handled.
- Known issue 3: Introspection does not reveal all available methods,
because some methods have unpredictable prototypes. Still hesitating
about what to do...
- Known issue 4: Error handling is not finished yet. Compton does not
always reply with the correct error message (but it does print out the
correct error message, usually).
2013-01-19 20:20:27 +08:00
* configuration files (see the man page for more details)
* colored shadows (`--shadow-[red/green/blue]`)
2012-10-22 20:41:24 +08:00
* a new fade system
Feature #80: D-Bus support
- Add D-Bus support. Currently 7 methods are available: "reset" (same as
SIGUSR1), "list_win" (list the windows compton manages), "win_get"
(get a property of the window), "win_set" (set a property of the
window), "find_win" (find window based on client window / focus),
"opts_get" (get the value of a compton option), and "opts_set" (set
the value of a compton option), together with 4 signals: "win_added",
"win_destroyed", "win_mapped", "win_unmapped".
- D-Bus support depends on libdbus.
- As there are many items and my time is tight, no much tests are done.
Bugs to be expected.
- Create a new header file `common.h` that contains shared content.
- Fix some bugs in timeout handling.
- Update file headers in all source files.
- Re-enable --unredir-if-possible on multi-screen set-ups, as the user
could turn if off manually anyway.
- Check if the window is mapped in `repair_win()`.
- Add ps->track_atom_lst and its handlers, to prepare for the new
condition format.
- Known issue 1: "win_get", "win_set", "opts_get", "opts_set" support a
very limited number of targets only. New ones will be added gradually.
- Known issue 2: Accidental drop of D-Bus connection is not handled.
- Known issue 3: Introspection does not reveal all available methods,
because some methods have unpredictable prototypes. Still hesitating
about what to do...
- Known issue 4: Error handling is not finished yet. Compton does not
always reply with the correct error message (but it does print out the
correct error message, usually).
2013-01-19 20:20:27 +08:00
* VSync support (not always working)
* Blur of background of transparent windows, window color inversion (bad in performance)
* Some more options...
2011-11-06 11:33:50 +08:00
2011-11-05 02:52:05 +08:00
## Fixes from the original xcompmgr:
* fixed a segfault when opening certain window types
* fixed a memory leak caused by not freeing up shadows (from the freedesktop
repo)
2012-10-22 20:41:24 +08:00
* fixed the conflict with chromium and similar windows
* [many more ](https://github.com/chjj/compton/issues )
2011-11-05 02:52:05 +08:00
## Building
### Dependencies:
2012-03-18 09:17:08 +08:00
__B__ for build-time
__R__ for runtime
* libx11 (B,R)
* libxcomposite (B,R)
* libxdamage (B,R)
* libxfixes (B,R)
2012-09-11 21:33:03 +08:00
* libXext (B,R)
2012-03-18 09:17:08 +08:00
* libxrender (B,R)
Feature: #7: VSync
- Add VSync feature. 3 possible VSync methods available: "sw" (software,
not too reliable, but at least you have something to fallback to),
"drm" (using DRM_IOCTL_WAIT_VBLANK, should work only on DRI drivers),
"opengl" (using SGI_swap_control extension OpenGL, might work on more
drivers than the DRM method). "sw" and "opengl" are briefly tested,
"drm" received utterly no test (because I use the nVidia binary blob).
They are enabled with "--vsync sw" / "--vsync drm" / "--vsync opengl".
- Add --refresh-rate to let user specify a refresh rate for software
VSync, in case the automatic refresh rate detection does not work
well.
- Seemingly the automatic refresh rate detection using X RandR in
software VSync detects refresh rate incorrectly. Need further investigation.
- Fix a few bugs in fading timing.
- Add a workaround for client window detection on Fluxbox, as Fluxbox
(incorrectly?) sets the override-redirect flag upon all frame
windows.
- Software VSync adds dependency on librt (a part of glibc) for
nanosecond-level timing functions, and libXrandr for automatic refresh
rate detection; DRM VSync adds dependency on libdrm to use its drm.h,
but does not link to libdrm; OpenGL VSync adds dependency on libGL.
- Print timing information on DEBUG_REPAINT.
2012-10-08 10:20:01 +08:00
* libXrandr (B,R)
2012-03-18 09:17:08 +08:00
* pkg-config (B)
* make (B)
* xproto / x11proto (B)
2013-01-31 22:53:44 +08:00
* sh (R)
2012-03-18 09:17:08 +08:00
* xprop,xwininfo / x11-utils (R)
Feature #80: D-Bus support
- Add D-Bus support. Currently 7 methods are available: "reset" (same as
SIGUSR1), "list_win" (list the windows compton manages), "win_get"
(get a property of the window), "win_set" (set a property of the
window), "find_win" (find window based on client window / focus),
"opts_get" (get the value of a compton option), and "opts_set" (set
the value of a compton option), together with 4 signals: "win_added",
"win_destroyed", "win_mapped", "win_unmapped".
- D-Bus support depends on libdbus.
- As there are many items and my time is tight, no much tests are done.
Bugs to be expected.
- Create a new header file `common.h` that contains shared content.
- Fix some bugs in timeout handling.
- Update file headers in all source files.
- Re-enable --unredir-if-possible on multi-screen set-ups, as the user
could turn if off manually anyway.
- Check if the window is mapped in `repair_win()`.
- Add ps->track_atom_lst and its handlers, to prepare for the new
condition format.
- Known issue 1: "win_get", "win_set", "opts_get", "opts_set" support a
very limited number of targets only. New ones will be added gradually.
- Known issue 2: Accidental drop of D-Bus connection is not handled.
- Known issue 3: Introspection does not reveal all available methods,
because some methods have unpredictable prototypes. Still hesitating
about what to do...
- Known issue 4: Error handling is not finished yet. Compton does not
always reply with the correct error message (but it does print out the
correct error message, usually).
2013-01-19 20:20:27 +08:00
* libpcre (B,R) (Can be disabled with `NO_REGEX_PCRE` at compile time)
* libconfig (B,R) (Can be disabled with `NO_LIBCONFIG` at compile time)
* libdrm (B) (Can be disabled with `NO_VSYNC_DRM` at compile time)
* libGL (B,R) (Can be disabled with `NO_VSYNC_OPENGL` at compile time)
* libdbus (B,R) (Can be disabled with `NO_DBUS` at compile time)
2013-01-11 21:31:02 +08:00
* asciidoc (B)
2011-11-05 02:52:05 +08:00
2012-11-14 18:42:09 +08:00
### How to build
To build, make sure you have the dependencies above:
2011-11-05 02:52:05 +08:00
2013-05-01 22:08:43 +08:00
```bash
2012-11-14 18:42:09 +08:00
# Make the main program
2011-11-05 02:52:05 +08:00
$ make
Feature #80: D-Bus support
- Add D-Bus support. Currently 7 methods are available: "reset" (same as
SIGUSR1), "list_win" (list the windows compton manages), "win_get"
(get a property of the window), "win_set" (set a property of the
window), "find_win" (find window based on client window / focus),
"opts_get" (get the value of a compton option), and "opts_set" (set
the value of a compton option), together with 4 signals: "win_added",
"win_destroyed", "win_mapped", "win_unmapped".
- D-Bus support depends on libdbus.
- As there are many items and my time is tight, no much tests are done.
Bugs to be expected.
- Create a new header file `common.h` that contains shared content.
- Fix some bugs in timeout handling.
- Update file headers in all source files.
- Re-enable --unredir-if-possible on multi-screen set-ups, as the user
could turn if off manually anyway.
- Check if the window is mapped in `repair_win()`.
- Add ps->track_atom_lst and its handlers, to prepare for the new
condition format.
- Known issue 1: "win_get", "win_set", "opts_get", "opts_set" support a
very limited number of targets only. New ones will be added gradually.
- Known issue 2: Accidental drop of D-Bus connection is not handled.
- Known issue 3: Introspection does not reveal all available methods,
because some methods have unpredictable prototypes. Still hesitating
about what to do...
- Known issue 4: Error handling is not finished yet. Compton does not
always reply with the correct error message (but it does print out the
correct error message, usually).
2013-01-19 20:20:27 +08:00
# Make the man pages
2012-11-14 18:42:09 +08:00
$ make docs
# Install
2011-11-07 08:20:45 +08:00
$ make install
2011-11-05 02:52:05 +08:00
```
2012-11-14 18:42:09 +08:00
(Compton does include a `_CMakeLists.txt` in the tree, but we haven't decided whether we should switch to CMake yet. The `Makefile` is fully usable right now.)
2012-11-14 20:44:31 +08:00
## Known issues
2011-11-05 02:52:05 +08:00
2013-05-01 22:08:43 +08:00
* Our [FAQ ](wiki/faq ) covers some known issues.
* VSync does not work too well. You may check the [VSync Guide ](wiki/vsync-guide ) for how to get (possibly) better effects.
2012-10-22 20:41:24 +08:00
2012-11-14 20:44:31 +08:00
* If `--unredir-if-possible` is enabled, when compton redirects/unredirects windows, the screen may flicker. Using `--paint-on-overlay` minimizes the problem from my observation, yet I do not know if there's a cure.
2012-10-22 20:41:24 +08:00
2012-11-14 20:44:31 +08:00
* compton may not track focus correctly in all situations. The focus tracking code is experimental. `--use-ewmh-active-win` might be helpful.
2012-10-22 20:41:24 +08:00
2013-05-01 22:08:43 +08:00
* The performance of blur under X Render backend might be pretty bad. OpenGL backend could be faster.
2012-10-22 20:41:24 +08:00
2013-05-01 22:08:43 +08:00
* With `--blur-background` you may sometimes see weird lines around damaged area. `--resize-damage YOUR_BLUR_RADISU` might be helpful in the case.
2012-12-18 22:04:22 +08:00
2012-11-14 20:44:31 +08:00
## Usage
2012-10-22 20:41:24 +08:00
2012-11-14 20:44:31 +08:00
Please refer to the Asciidoc man pages (`man/compton.1.asciidoc` & `man/compton-trans.1.asciidoc` ) for more details and examples.
2011-11-07 12:03:18 +08:00
2012-11-14 20:44:31 +08:00
Note a sample configuration file `compton.sample.conf` is included in the repository.
2012-10-22 20:41:24 +08:00
2012-11-14 20:44:31 +08:00
## Support
* Bug reports and feature requests should go to the "Issues" section above.
* Our (semi?) official IRC channel is #compton on FreeNode.
2013-05-01 22:08:43 +08:00
* Some information is available on the wiki, including [FAQ ](wiki/faq ), [VSync Guide ](wiki/vsync-guide ), and [Performance Guide ](wiki/perf-guide ).
2011-11-16 14:04:38 +08:00
2011-11-07 12:03:18 +08:00
## License
2012-10-22 20:41:24 +08:00
Although compton has kind of taken on a life of its own, it was originally
an xcompmgr fork. xcompmgr has gotten around. As far as I can tell, the lineage
for this particular tree is something like:
2011-11-07 12:03:18 +08:00
* Keith Packard (original author)
* Matthew Hawn
* ...
* Dana Jansens
2012-10-22 20:41:24 +08:00
* chjj and richardgv
2011-11-07 12:03:18 +08:00
Not counting the tens of people who forked it in between.
2012-11-14 20:44:31 +08:00
Compton is distributed under MIT license, as far as I (richardgv) know. See LICENSE for more info.