Commit Graph

434 Commits

Author SHA1 Message Date
Brottweiler 1b5dc5e970 Fix some missing trailing semicolons 2016-09-04 19:24:24 +02:00
Richard Grenville f1cd308cde compton-convgen: Misc: Clean up
compton-convgen: Misc: Clean up. The commit brings no change to the
functionality of the script.

 - Partially fix PEP 8 compliance:

   - Place imports on separate lines.

   - Replace leading tabs with 4 spaces.

   - Add docstrings to classes and functions.

   - Surround top-level function and class definitions with two blank
     lines.

   - Remove spaces around keyword arguments.

   - Move all statements to separate lines.

   - Break some long lines into several lines.

 - Remove trailing semicolons after statements.

 - CGError: Use functionality from the base class Exception to store the
   description, instead of the custom logic.

 - CGInternal: Remove, as it is unused.

 - Hide the internal function gen_invalid() and args_readfactors() by
   prefixing their names with an underscore.

 - Move the module-level command-line handling code to two new
   functions, _main() and _parse_args(), and only execute if running in
   the main scope.
2016-08-10 23:53:41 +08:00
Richard Grenville 2343e4bbd2 Misc #308: Close config file after using it
Misc #308: Close the config file after using it, instead of leaving it
open forever. Thanks to SyedAmerGilani for the report.
2015-09-22 08:34:28 +08:00
Richard Grenville d7f95b56b1 Misc: Create directories for icons before installing them
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.
2015-09-20 17:16:54 +08:00
Richard Grenville 6deda6a95f Merge pull request #291 from nejsan/patch-1
Set icon to `compton` in compton.desktop
2015-09-20 16:41:58 +08:00
Nate Hart 0e7d4364e0 Added install rules for Compton logo 2015-09-17 21:57:11 -04:00
Nate Hart 7fe5512e91 Added 48x48px raster of initial Compton logo 2015-09-17 21:57:11 -04:00
Nate Hart 0b044a947f Added svg of initial Compton logo 2015-09-17 21:57:10 -04:00
Richard Grenville 20e996494b Misc: Modify function attributes
- Remove the const function attribute from get_time_*(), since the
   functions they call that actually get the time probably access global
   variables or have other behaviors unacceptable for const functions.

 - Change the const function attribute on win_has_frame() to pure, as it
   accesses memory its parameter points to, which is invalid for a const
   function.
2015-09-06 22:34:02 +08:00
Richard Grenville c156abb0e8 Bug fix #302: Use more EWMH-compliant way to determine frame extents
Bug fix: Select the larger of the X window border width and
_NET_FRAME_EXTENTS, instead of adding them together, when determining
the frame extents. (Supposedly) more EWMH compliant, as EWMH
_NET_FRAME_EXTENTS should include the X window border width already. We
did not choose to completely rely on _NET_FRAME_EXTENTS to remove the
need to keep track of whether there is a _NET_FRAME_EXTENTS, and
(hopefully) take care of some cases when it is wrong. The commit should
fix awesomeWM/awesome#425. Thanks to psychon for the information. (#302)

The commit fixes the bug in win_get_region_noframe() that the X window
border width is not considered when determining the width/height of the
window without frame, as well.
2015-09-06 22:19:19 +08:00
Richard Grenville 50317f75c7 Misc: Add some entries to .gitignore
Misc: Add Vim swap files for unnamed buffers (".sw[a-z]") and
YouCompleteMe configuration files (".ycm_extra_conf.py{,c}") to
.gitignore.
2015-09-06 20:54:14 +08:00
Richard Grenville 7d4d87d683 Misc: Add margin_t & Store frame extents with it & Misc
- Add margin_t, a structure that represents margins around a rectangle.

 - Store frame extents of a window with margin_t, replacing the 4
   fields ({left,right,top,bottom}_width) in struct _win.

 - Add two helper macros, cmemzero() and cmemzero_one(), that zero out a
   block of memory.
2015-09-06 20:53:07 +08:00
Richard Grenville 86266e00e2 Merge branch 'master' into richardgv-dev 2015-08-23 20:41:43 +08:00
Richard Grenville 10517b2b31 Merge pull request #285 from kelleyk/upstream-patchqueue
Plug XserverRegion leak.
2015-08-23 20:39:18 +08:00
Nate Hart de3199b138 Set icon to `compton` in compton.desktop 2015-06-05 17:14:46 -05:00
Kevin Kelley 0e0b35a361 Plug XserverRegion leak. 2015-05-12 13:17:35 -07:00
Richard Grenville 86e88bdf71 Misc: Update the descriptions of --backend in compton man page
Misc: Update the descriptions of --backend in the compton man page.
Mention `xr_glx_hybrid` backend, and add more descriptions of the
operation and characteristics of the backends. Thanks to @onodera-punpun
in the Gitter room for telling me about the missing documentation of the
`xr_glx_hybrid` backend.
2015-04-26 16:28:05 +08:00
Richard Grenville b1889c1245 Merge pull request #280 from pmattern/man-pages
minor fix in man (1) compton
2015-04-20 08:07:59 +08:00
Peter Mattern a8061c8bbe man (1) compton: fix $XDG_CONFIG_DIRS 2015-04-16 19:48:11 +02:00
Richard Grenville 5a00adad39 Merge pull request #273 from Corax26/trans-c-fix
Fix compton-trans -c
2015-03-29 18:34:15 +08:00
Corax26 e4c0b8301d Fix compton-trans -c
The pipeline used to retrieve the WID of the active window returns a bad WID because xprop returns several hex numbers and ".*" in the sed regex is greedy. For instance, running "xprop -root -notype _NET_ACTIVE_WINDOW" gives me:
_NET_ACTIVE_WINDOW: window id # 0x1a0003d, 0x0
Filtering this output with the sed substitution then gives "0x0", since the first ".*" matches everything up to *the last* hex number.

The fix is simply to grep hex numbers instead of using a sed substitution, and then choose the first one.
2015-03-26 01:31:00 +01:00
Richard Grenville 663e1a1a04 Bug fix: --active-opacity state does not change correctly on `--focus-exclude`-ed windows
Fix the bug that --active-opacity state does not change
on `--focus-exclude`-ed windows correctly, since win_update_focused()
enables the WFLAG_OPCT_CHANGE flag on a window only if w->focused
changes, while --active-opacity depends on the output of
win_is_focused_real() instead of w->focused, which could be changed even
if w->focused does not change (e.g. when the window is
`--focus-exclude`-ed).
2015-02-24 21:08:29 +08:00
Richard Grenville 0ab80bd3e7 Merge pull request #264 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-02-24 20:31:49 +08:00
The Gitter Badger 2aec99142d Added Gitter badge 2015-02-17 03:44:14 +00:00
Richard Grenville 3b17fe15f0 Bug fix #263: Always redirect std{out,err} if --logpath is specified
Always redirect std{out,err} if --logpath is specified, instead of only
redirect after fork, to correct the inconsistent behavior of --logpath
when getppid() returns 1. (#263)
2015-01-26 21:28:48 +08:00
Richard Grenville 64b4fe2c72 Misc #262: Allow `make install` w/o docs
Allow `make install` w/o documentations, as `make MANPAGES= install`.
(#262)
2015-01-25 10:46:22 +08:00
Richard Grenville 23d1dd1c0e Misc: Add two test scripts
Add two scripts for testing build.
2015-01-11 16:30:41 +08:00
Richard Grenville 25b217ff52 Misc: Move shared functions out of make-release.sh
- Move shared functions in make-release.sh to a separate file,
   functions.sh .

 - Add more comments to make-release.sh and functions.sh .
2015-01-11 16:26:36 +08:00
Richard Grenville e4ff1a5130 Misc: Update disabled-at-compile-time notes in the usage text
- Add disabled-at-compile-time note in usage text with NO_LIBCONFIG.

 - Fix the incorrect disabled-at-compile-time note for --backend.

 - Move position of the disabled-at-compile-time note of --dbus
   slightly.
2015-01-11 16:24:54 +08:00
Richard Grenville 4d0c663ad2 Misc: Add comments of options in Makefile
Add comments about compile-time options in Makefile.
2015-01-11 16:17:30 +08:00
Richard Grenville 44ccbfab9f Misc: Update CMakeLists.txt
- CMakeLists.txt: add remaining non-debugging compile-time options
   present in Makefile but not here: CONFIG_VSYNC_OPENGL_{FBO,VBO},
   CONFIG_DBUS, and CONFIG_XSYNC.

 - CMakeLists.txt: Use CMakeDependentOption for option dependency.

 - CMakeLists.txt: Remove quotes around library CFLAGS and LDFLAGS to
   allow multiple values.
2015-01-11 11:01:37 +08:00
Richard Grenville 03ebae4c33 Bug fix: Compilation failure with NO_VSYNC_OPENGL=1
Fix compilation failure with NO_VSYNC_OPENGL=1, caused by one
incorrectly placed "#endif" in "src/common.h".
2015-01-11 10:47:19 +08:00
Richard Grenville e2540f7885 Merge pull request #259 from akdor1154/glslFlag
add GLSL compile flag to CMakeLists
2015-01-10 12:13:38 +08:00
Jarrad 2140a544ff add GLSL compile flag 2014-12-30 11:08:36 +11:00
Richard Grenville 65e655e3bc Bug fix: --no-fading-openclose doesn't work when fading out
- Fix the bug that --no-fading-openclose doesn not work when fading out
   by writing w->fade_last as well in win_determine_fade().

 - Write w->fade_last for applying w->fade_force, as well.
2014-11-30 15:39:07 +08:00
Richard Grenville 6d8fde457a Bug fix #244: Build failure with -DDEBUG_EVENTS
Fix build failure with -DDEBUG_EVENTS, caused by incorrect references to
X Sync macros. Thanks to blueyed for reporting. (#244)
2014-11-24 22:31:54 +08:00
Richard Grenville 5910dbae8a Misc #215: Reformat usage text & update docs
- Reformat usage text by adding a blank line between descriptions of
   two switches. (#215)

 - Update documentation for a bit. Correct some wrong statements and
   clarify some others.
2014-11-24 22:03:07 +08:00
Richard Grenville 651a66131f Bug fix #224: Flush after XUngrabServer()
Fix #224 by XFlush() after XUngrabServer(). Thanks to rathsky and smlx
for reporting.
2014-10-06 11:36:47 +08:00
Richard Grenville 8c88b4d6f1 Misc #204: Add glx_take_screenshot() & others
- Add glx_take_screenshot() for taking a screenshot. With ImageMagick
  the output data could be viewed in this way:

    display -size [SCREEN-WIDTH]x[SCREEN-HEIGHT] -depth 8 -flip
    rgb:[PATH]

  (#204)

- Add D-Bus command `opts_get string:paint_on_overlay_id` to get X
  Composite overlay window ID. (#204)

- Code cleanup.
2014-09-07 18:58:09 +08:00
Richard Grenville c5f45c8e3c Merge branch 'richardgv-dev' of github.com:chjj/compton into richardgv-dev 2014-09-07 16:07:26 +08:00
Richard Grenville 094b75eef7 Misc: Add --no-name-pixmap
Add --no-name-pixmap to disable the usage of
XCompositeNameWindowPixmap(), for debugging.
2014-09-07 16:05:14 +08:00
Richard Grenville 82242f58e8 Merge pull request #223 from maep--/master
fix crash caused by free of uninitialized pointer
2014-08-07 09:18:23 +08:00
mæp 72301f9177 fix crash caused by free of uninitialized pointer 2014-08-06 20:42:57 +02:00
Richard Grenville 4f9050f53f Misc: Fix spelling mistakes
Still, "Guassian" -> "Gaussian". (#221)
2014-08-06 07:32:53 +08:00
Richard Grenville 93c00e0f66 Merge pull request #221 from treeman1111/patch-1
Changed "guassian" to gaussian .
2014-08-06 07:26:47 +08:00
Duncan 981b7408ae Changed "guassian" to gaussian . 2014-08-05 15:27:18 -04:00
Richard Grenville a801118c04 Bug fix: Fix X pixmap leakage in shadow_paint
- Fix X pixmap leakage in shadow_paint.

- Add the skeleton of a X resource leakage checker.
2014-08-03 19:40:40 +08:00
Richard Grenville 3cfbaac955 Misc: Fix compilation with NO_VSYNC_OPENGL_GLSL / NO_C2
Fix compilation with NO_VSYNC_OPENGL_GLSL / NO_C2.
2014-07-29 09:29:26 +08:00
Richard Grenville 4724c1f21a Misc #218: Warn about using --glx-no-rebind-pixmap on intel driver
Warn about using --glx-no-rebind-pixmap on xf86-video-intel. Thanks to
aktau for the info. (#218)
2014-07-28 16:54:02 +08:00
Richard Grenville 234e3e8cda Improvement: Separate GLX parts from session_t & Attempt to fix #217
- Separate GLX parts from session_t into glx_session_t.

- Add --rererdir-on-root-change and --glx-reinit-on-root-change, as
  possible solutions for #217. Thanks to jlindgren90 for reporting.
2014-07-28 12:50:15 +08:00