Commit Graph

1023 Commits

Author SHA1 Message Date
Richard Grenville cdf7db750d Improvement: Change painting sequence
- Now compton paints windows from the lowest to the highest.  Warning:
  I'm not completely certain that the change won't introduce unexpected
  glitches. This commit may be revoked in the future.

- Remove w->border_clip since it's no longer needed.

- Correct a mistake in find_toplevel2(). (clang --analyze found it out.)

- Change "func_name()" prototypes to "func_name(void)". If I remember
  correctly, "func_name()" means you are remaining silent about this
  function's parameters instead of stating it has no parameter in ANSI
  C.

- Add timestamps to error messages.

- Suppress error messages caused by free_damage().
2012-09-17 16:04:04 +08:00
Richard Grenville dfde67255f Improvement: Change generating process of alpha_pict, etc.
- Change how w->alpha_pict is generated, in hope to boost performance,
  slightly, and as a step to eventually move handling code of most resources
  used when painting to paint_preprocess().

- Remove alpha_pict parameter of shadow_picture() as it's not
  necessary.

- Let window opacity affect frame opacity.

- Rename some members of struct _win.
2012-09-17 12:41:41 +08:00
Richard Grenville 64d53f6534 Misc: Clean up
- Add 4 helper free functions that free XserverRegion, Damage, Picture,
  and Pixmap.

- Rename w->shadow to w->shadow_pict. Add a bool member w->shadow to
  prepare for a future change.
2012-09-16 23:17:34 +08:00
Richard Grenville 4293a4626a Bug fix: Issue #43, better client window lookup
More details on the issue report.

- Look up the client window of a WM frame when it's mapped instead of when
  it's created, for better reliability.

- Fix a warning when building.
2012-09-14 11:51:46 +08:00
Christopher Jeffrey 0d4c6fc5cc fix code duplication resulting from rebase 2012-09-13 10:28:27 -05:00
Christopher Jeffrey e2c14ee545 fix determine_evmask warnings 2012-09-13 10:24:37 -05:00
Christopher Jeffrey 0064894bf6 more style changes 2012-09-13 10:24:14 -05:00
Christopher Jeffrey 5bcbf87f32 stay consistent with code style 2012-09-13 10:00:57 -05:00
Christopher Jeffrey 5112f91c48 whitespace 2012-09-13 09:59:50 -05:00
Richard Grenville 271d894eae Bug fix: Segfault when meeting FocusIn/Out from destoryed windows
I found compton segfaults sometimes when starting from .xinitrc.
Debugging reveals my conky window was just reparented to a fvwm's
frame window before compton picked up a FocusOut event on this conky
window that has just been destroyed in the event queue. find_win()
call in ev_focus_in/out() returned a NULL pointer. When it tried to
use the pointer segfault happens.

- Add extra check to ev_focus_in/out() to stop the segfault.

- Reset window event mask on window reparenting to a non-root window to
  minimize wrong events.

- More abstraction for determining window event mask.
2012-09-13 22:30:18 +08:00
Richard Grenville 18b3a96d0b Improvement: Use find_toplevel() to find WM frame
Use find_toplevel() to find out the WM frame of a client window. I
didn't noticed it beforehand. Fallback to the old method as compton does
not always get correct client windows.

- Clean up find_client_win() a bit. A BFS search algorithm could be more
  optimal yet it requires a queue implementation.
2012-09-13 21:38:55 +08:00
Richard Grenville d0399313fc Improvement: Do not track focus changes unless necessary
Stop tracking focus changes unless either inactive_opacity or
inactive_dim is enabled, small performance boost in certain cases.
2012-09-13 11:47:31 +08:00
Richard Grenville 3abeb58690 Bug fix: Issue #40: -z does not work as expected
More information in the issue report.

- Let window opacity affect the opacity of its shadow and frames even if
  -z is enabled.

- Check for the range of -o to eliminate potential segfault.
2012-09-12 21:01:06 +08:00
Richard Grenville 6f079af2f0 Bug fix: Double free when XQueryTree() fails
Take care of failure of XQueryTree() to prevent it from causing a
double-free crash. This usually happens when X is initializing and windows
are constantly changing.
2012-09-12 12:14:24 +08:00
Richard Grenville 35f7d45130 Bug fix: Issue #39: Render windows just mapped && focused incorrectly
More info in the issue description. This also fixes the problem for
--inactive-dim.
2012-09-12 11:06:16 +08:00
Richard Grenville e9cfa49c86 Feature: Issue #2: Support dim inactive windows
- Add a switch --inactive-dim that dims inactive windows.

- The window dimming feature is implemented in a pretty ugly way.
  Improve it if possible.
2012-09-12 10:52:52 +08:00
Richard Grenville f280750a03 Debug: Enhanced debugging capability
- Change all #if DEBUG_XXX directives to #ifdef, thus making it
  possible to directly enable debugging options with CFLAGS
  (-DDEBUG_XXX).

- Print timestamp before event debugging messages.
2012-09-12 09:08:15 +08:00
Richard Grenville c905c882b4 Bug fix: Segfault when encountering invalid long option
I didn't read the documentation of getopt_long() carefully.
2012-09-11 23:11:23 +08:00
Richard Grenville 129115171a Bug fix: Issue #37, fix 5 opacity-related bugs
More details in the bug report.

- Rewritten much of the opacity calculation, code cleanup.

- Commandline switch --inactive_opacity_override to restore the old
  behavior in which inactive_opacity has higher priority than
  _NET_WM_OPACITY.
2012-09-11 22:22:58 +08:00
Richard Grenville deaaf5c5cf Feature: Issue #35, Add colored shadows
- Use getopt_long() instead of getopt() for argument parsing, making
  long options possible.

- Add support of colored shadows with 3 commandline switches.
2012-09-11 21:57:50 +08:00
Richard Grenville f5aed89a67 Bug fix: Issue #36: Chromium window painting problems
More descriptions on issue #36.

- Listens ShapeNotify event to get around the Chromium window painting
  issues.

- Adds dependency on X Shape extension.

- Adds a few functions for convenience, so a bit code clean up.

- Better event debug support, adds restack_win() debug.
2012-09-11 21:33:03 +08:00
Richard Grenville 8628371a83 Bug fix: Issue #38, fixes painting specially-shaped semi-transparent windows
Fix taken from xcompmgr.
2012-09-11 21:11:06 +08:00
Richard Grenville 4861d50ca4 Misc: Add Vim swap files to .gitignore 2012-09-11 21:07:29 +08:00
Christopher Jeffrey eb3b13145d avoid allocating a new win struct if possible 2012-09-08 21:13:56 -05:00
Christopher Jeffrey 02e2deea54 add richardgv's patch. see #31. 2012-09-08 21:04:44 -05:00
Christopher Jeffrey 94efff0bb2 apply patch from richardgv. fixes #5. 2012-09-07 11:51:08 -05:00
Christopher Jeffrey 2a566e83a7 rename settrans to compton-trans, add manpage. 2012-06-23 17:39:49 -05:00
Christopher Jeffrey f358eb5962 rename, refactor again. 2012-06-03 12:35:33 -05:00
Christopher Jeffrey 3dfaea3698 refactor, rename 2012-06-03 11:08:50 -05:00
Christopher Jeffrey 84b7c3e65d minor settrans changes 2012-05-27 19:21:14 -05:00
Christopher Jeffrey d52f7a06db refactor settrans 2012-04-01 00:01:31 -05:00
Christopher Jeffrey 24bf591bd7 destdir 2012-03-20 19:30:20 -05:00
Christopher Jeffrey 24ffba0e51 use destdir. closes #15. 2012-03-20 19:27:51 -05:00
Christopher Jeffrey b3a272185d Merge pull request #14 from hasufell/master
enhance readme
2012-03-17 18:26:04 -07:00
hasufell b34f175e51 add and clarify dependencies, build/runtime 2012-03-18 02:17:08 +01:00
Christopher Jeffrey efd5643858 Merge pull request #13 from hasufell/patch-1
improve build system
2012-03-17 18:05:53 -07:00
hasufell a0f4bfb5e8 respect cflags and ldflags, default to gcc if CC is unset, fix install-method 2012-03-18 02:00:49 +01:00
Christopher Jeffrey 5a95e51a06 Merge pull request #12 from timvdalen/master
Fixed usage text
2012-03-17 16:21:33 -07:00
Tim van Dalen 1584805ea7 Fixed a (very) small 'bug' in the usage text, -f wasn't printed on a new line. 2012-03-17 19:01:28 +01:00
Christopher Jeffrey f7b57d527f improve make install. closes #9. 2012-02-28 09:04:10 -06:00
Christopher Jeffrey 674ac5b6cd stop listening for property events on client window after unmap 2012-02-28 01:52:41 -06:00
Christopher Jeffrey 0e956de906 fix makefile to work without gnu cp 2012-02-27 10:59:36 -06:00
Christopher Jeffrey b01cfea5c6 minor changes 2012-02-27 10:41:12 -06:00
Christopher Jeffrey 8f4eafaf79 reorganize tree 2012-02-27 05:22:33 -06:00
Christopher Jeffrey a353f5bc4b refactor. remove a lot of dead code. 2012-02-26 22:28:06 -06:00
Christopher Jeffrey 1591d8b4ce Merge pull request #8 from XeCycle/master
Two new features
2012-02-26 19:11:02 -08:00
XeCycle d226a9d988 Add -b option to fork to background. 2012-02-27 01:02:42 +08:00
XeCycle 92eb57ff44 Add option to avoid DND shadows. 2012-02-27 00:35:17 +08:00
Christopher Jeffrey c01befec1f dont zero frame extents. possible fix for #6. 2012-02-22 01:09:16 -06:00
Christopher Jeffrey b93c6875cf change prefix 2012-02-20 04:38:16 -06:00