Commit Graph

349 Commits

Author SHA1 Message Date
Richard Grenville d8977408fd Bug fix #153: Possible fix for a rare timing issue
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)
2013-10-21 22:17:01 +08:00
Richard Grenville 796e2c6fec Bug fix #149: --opacity-rule misbehaves on 32-bit systems & others
- Fix a bug that --opacity-rule misbehaves with a value higher than 50%
  on 32-bit systems. Thanks to mrinx for reporting. (#149)

- Fix a bug that opacity-rule in configuration file does not work.
2013-10-01 23:20:22 +08:00
Richard Grenville fc8ec8851f Misc: Typo in vsync_opengl_init()
I typed ps->glXGetVideoSyncSGI as ps->glXWaitVideoSyncSGI...
2013-09-26 07:41:11 +08:00
Richard Grenville f202223572 Misc: Add cfg file options for --unredir-if-possible-*
Add configuration file options for
--unredir-if-possible-{delay,exclude}. (#140)
2013-09-24 20:41:50 +08:00
Richard Grenville 4bd3db2bc7 Bug fix #99: Rewrite focus detection logic
- Rewrite focus detection logic. Remove w->focused_real and use
  ps->active_win to identify focused window uniformly. Use a more
  expensive way to filter FocusIn/Out events to improve reliability.
  Only limited tests are done, and bugs are likely to be introduced.
  (#99)

- Known issue: Under fvwm, compton sometimes does not consistently
  report the window input gets sent to. But there's something wrong in
  that case: XGetInputFocus() shows the root window is focused but
  another window is receiving input.
2013-09-18 22:41:40 +08:00
Richard Grenville a6b76e954f Misc: Add make-release.sh
Add make-release.sh, which creates a release tarball, with
documentations built (to lift asciidoc dependency), and COMPTON_VERSION
defined.
2013-09-16 22:36:51 +08:00
Richard Grenville 747ffaef0f Bug fix #144: Workaround for insane window type changes
Dynamically detect window type as a workaround to insane applications.
Thanks to Feltzer for reporting. (#144)
2013-09-15 11:07:49 +08:00
Richard Grenville 926ae379ba Bug fix #143: GLSL shader error on European locales
Set LC_NUMERIC=C when generating GLSL shader strings to avoid decimal
point issues on European locales. Thanks to hiciu for reporting.
2013-09-15 08:56:53 +08:00
Richard Grenville 5da802634a Bug fix #143: Move setlocale(LC_NUMERIC, "C")
Move setlocale(LC_NUMERIC, "C") to a better place, in hope to fix #143.
Thanks to hiciu for reporting!
2013-09-14 10:04:38 +08:00
Richard Grenville e9d187f03e Bug fix #140: Possible fix for CPU usage with --unredir-possible-delay
- Possible fix for high CPU usage with a low --unredir-possible-delay.
  Thanks to Feltzer for reporting. (#140)

- Rewrite some parts to (hopefully) increase performance, especially
  with --unredir-if-possible.

- Known issue: With GTX 670 and x11-drivers/nvidia-drivers-325.15, and
  compton --unredir-if-possible --config /dev/null, if you send a
  SIGUSR1 to compton when a full-screen solid window is there, in which
  case compton either redirects then immediately unredirects the screen,
  or just don't redirect it altogether, X freezes after compton
  unredirects the screen. Requests sent by other X clients are not
  responded until compton is killed, which indicates the possibility of
  a bug in X.  Attaching to X process shows X is on ./os/waitFor.c.
  Backend does not matter. --paint-on-overlay fixes the issue somehow.
  compton-git-v0.1_beta1-5-g4600f43-2013-08-28 doesn't exhibit the
  issue, but it's probably timing-related.
2013-09-12 21:23:20 +08:00
Richard Grenville 9f4eb87363 Misc: Update CMake files & docs
Update CMake files and docs. CPackConfig.cmake has some issues. At
least, it builds correctly with CMake now.
2013-09-06 23:18:44 +08:00
Richard Grenville 4acbd56722 Improvement: --unredir-if-possible-exclude & --unredir-if-possible-delay
- Add --unredir-if-possible-exclude, to exclude certain windows when
  evaluating --unredir-if-possible. (#140)

- Add --unredir-if-possible-delay, to add some delay before
  unredirecting screen. (#138, #140)

- Code clean-up.
2013-09-04 22:00:51 +08:00
Richard Grenville 5350127b72 Misc: GLX: Avoid using multi-sampling visuals
Avoid using multi-sampled visuals, like the cogl patch:
http://people.freedesktop.org/~glisse/0001-glx-do-not-use-multisample-visual-config-for-front-o.patch
2013-09-03 21:14:40 +08:00
Richard Grenville 4600f435dd Bug fix #137: Auto-detect screen changes
Attempt to auto-detect screen changes to address the issue reported by
Feltzer.
2013-08-28 21:54:04 +08:00
Richard Grenville 5d4ed8f43f Misc: Add missing configuration file options and switches
- Add "xinerama_shadow_crop" configuration option.

- Add long commandline switches corresponding to the short ones.

- Documentation update.
2013-08-26 22:00:53 +08:00
Richard Grenville 3e71f8fa25 Improvement #137: --xinerama-shadow-crop
Add --xinerama-shadow-crop to crop shadow to current Xinerama screen.
Thanks to Feltzer for suggestion.
2013-08-22 21:44:15 +08:00
Richard Grenville 806f09dc3b Misc #136: Add CPPFLAGS support
Thanks to smlx for reporting.
2013-08-21 22:18:39 +08:00
Richard Grenville 6037eb2691 Misc #134: Fix compton.desktop
Fix some minor issues in compton.desktop. Thanks to pvanek for
reporting.
2013-08-13 22:34:39 +08:00
Richard Grenville 7417f0deee Misc: stoppaint_force & Documentation update
- Add stoppaint_force option, controlled via D-Bus, to stop painting
  completely, which may look better than unredirecting the screen,
  sometimes. (#41)

- Add x2, y2 matching targets.

- Update documentation.
2013-07-30 22:24:11 +08:00
Richard Grenville b46deb5162 Improvement #41: Enable/disable redirection through D-Bus
- Add "redirected_force" to D-Bus opts_get to forcefully
  redirect/unredirect windows.

- Add D-Bus method "repaint", to, namely, repaint the screen.
2013-07-26 13:02:06 +08:00
Richard Grenville b1e0ef8ecd Bug fix #124: GLX: Missing check on FBConfig X visual depth
- Check FBConfig X visual depth, like Compiz, to fix issues with
  nvidia-drivers-325.08 . Thanks to guotsuan for reporting.
2013-07-05 23:22:58 +08:00
Richard Grenville b26bbc0099 Misc: OpenGL 3.0 compatibility & misc
- Fix OpenGL 3.0 compatibility by changing glFramebufferTexture() to
  glFramebufferTexture2D(). Thanks to danfe for suggestion!

- Add notification about DocBook toolchina dependencies. Thanks to
  danfe. (#121)
2013-06-25 23:08:41 +08:00
Richard Grenville c02b3fadf0 Misc: --paint-exclude & #119
- Add --paint-exclude to prevent certain windows from being painted, for
  debugging purposes.

- Add predefined matching target "x", "y", "width", "height", "widthb",
  "heightb", "border_width", and "fullscreen".

- Fix bug #119, wrong man page install dir in CMake configuration.
  Thanks to sstewartgallus for reporting.
2013-06-19 19:36:48 +08:00
Richard Grenville 044a5c991c Feature #116: Shadow exclusion region
- Add --shadow-exclude-reg, which excludes certain regions on the screen
  to have shadows painted in. (#116)

- Adjust session initialization order. Now X root and screen info and
  basic X extensions are available in configuration parsing step.
2013-06-09 17:09:28 +08:00
Richard Grenville 75ebd56f74 Feature #113: Set opacity based on conditions
- Add --opacity-rule, which sets opacity based on conditions, as
  requested by zabbal. (#113)

- Add a data field for each condition.

- Correct the FAQ link in README.md. Silly me.

- Code clean-up.
2013-05-21 09:26:18 +08:00
Richard Grenville 07bc7485c3 Imp: Multi-pass blur & D-Bus fading control
- 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.
2013-05-20 18:16:27 +08:00
Richard Grenville 1b34dc3a9a Merge branch 'richardgv-dev' 2013-05-16 10:09:53 +08:00
Richard Grenville 57d8b940e7 Misc: Add DEBUG_GLX_MARK & Misc
- GLX backend: Add DEBUG_GLX_MARK, to add GL marks around functions with
  glStringMarkerGREMEDY(), and mark frame termination with
  glFrameTerminatorGREMEDY().

- Print output of `compton -h` to stdout. (#110)

- GLX backend: Strip out elements with factor 0 in GLSL blur code.
  Thanks to jrfonseca for guides. (#107)
2013-05-12 18:21:16 +08:00
Richard Grenville 9a45338254 Misc: Small fix for regex in compton-trans 2013-05-11 08:13:06 +08:00
Richard Grenville 1cb6058732 Merge pull request #108 from chjj/compton_trans
compton-trans improvements
2013-05-10 16:58:20 -07:00
Richard Grenville 90099d371d Bug fix: Compilation failure with NO_LIBCONFIG / NO_C2
- Fix compilation failure with NO_LIBCONFIG or NO_C2. Thanks to
  Spaulding for reporting.
2013-05-09 21:47:09 +08:00
Richard Grenville 48fb54dfae Misc: Add DEBUG_GLX_PAINTREG
- GLX: Add DEBUG_GLX_PAINTREG, for debugging painting region issues, for
  p4ddy's problem.
2013-05-09 09:43:40 +08:00
Richard Grenville 1c66237f99 Imp: Fix GL_TEXTURE_RECTANGLE & Enhance --glx-copy-from-front
- Fix GL_TEXTURE_RECTANGLE support. Thanks to amonakov for guides.
  (#107)

- Enhance --glx-copy-from-front to improve performance and make it work
  with --glx-swap-method, copied from kwin patch. Thanks to bwat47 for
  info. (#107)

- Add texture2Doffset() support in blur GLSL shader. Thanks to amonakov
  for advice. No visible benefit here, though. (#107)

- Only limited tests are done and I'm super sleepy. Bugs expected
2013-05-08 22:50:02 +08:00
Christopher Jeffrey a9a3b015e1 compton-trans: ensure wid format. misc.
xwininfo falls back to cursor selection if the window ID is formatted
improperly.
2013-05-04 21:07:42 -05:00
Christopher Jeffrey 216441c7b0 compton-trans: add reset option. 2013-05-04 20:40:01 -05:00
Christopher Jeffrey 7c451c10f7 compton-trans: allow long option names. 2013-05-04 20:39:08 -05:00
Christopher Jeffrey b0db9f4f07 Revert "compton-trans: use getopt instead of getopts."
This reverts commit 80a3c80561.
2013-05-04 18:14:41 -05:00
Christopher Jeffrey 80a3c80561 compton-trans: use getopt instead of getopts. 2013-05-04 17:51:00 -05:00
Christopher Jeffrey c9bf88cc89 compton-trans: use a different workaround with getopts. 2013-05-04 17:50:31 -05:00
Christopher Jeffrey e6b973fe2f compton-trans: minor. consistency. 2013-05-04 16:54:18 -05:00
Christopher Jeffrey ad23872801 compton-trans: add a 'get' option. 2013-05-04 16:51:24 -05:00
Christopher Jeffrey 86b20e0a08 compton-trans: improve option parsing. 2013-05-04 16:20:18 -05:00
Christopher Jeffrey 25d31a1f5e compton-trans: cleanup. add remove-prop option. 2013-05-04 13:50:36 -05:00
Christopher Jeffrey 054d343622 compton-trans: more consistency. 2013-05-04 13:36:24 -05:00
Christopher Jeffrey 9a4d202f5d compton-trans: consistency, better bash practices, refactor. 2013-05-04 13:18:04 -05:00
Richard Grenville 555131101f Misc: Documentation update
- Just fix some small issues in README.md .
2013-05-04 21:23:20 +08:00
Richard Grenville 7a4f5920d8 Misc: Validate wallpaper pixmap & Documentation update
- Split Pixmap validation out to validate_pixmap(). Validate wallpaper
  Pixmap as well.

- Update README.md and man page.
2013-05-01 22:08:43 +08:00
Richard Grenville a3f6f4442b Improvement: Add predefined blur kernels
- Add a few predefined blur kernels, requested by jerri in #104.

- Add compton-convgen.py to generate blur kernels.
2013-04-29 22:42:46 +08:00
Richard Grenville abd559c512 Bug fix: Fix a BadRegion error with --glx-use-copysubbuffermesa
Just a small and mostly harmless issue. Sorry, didn't test throughly.
2013-04-27 20:43:39 +08:00
Richard Grenville 3f00b3622c Bug fix: Fix --resize-damage
- Fix --resize-damage. I forgot to shrink the painting region back when
  actually copying to destination.

- Include extra pixels around the blur texture to avoid some possible
  small issues, if --resize-damage is positive.

- Known issue: Line artifacts may still appear with --dbe (X Render
  backend) or --glx-swap-method (GLX backend). I doubt if there's way to
  fix this without very inefficient mechanisms.
2013-04-27 17:44:10 +08:00