Skip to content

Commit

Permalink
Add warning when not using glx backend
Browse files Browse the repository at this point in the history
  • Loading branch information
tryone144 committed Feb 22, 2018
1 parent 34aa5a8 commit 964085c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions man/compton.1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@ OPTIONS

*--blur-method* 'ALGORITHM'::
Specify the algorithm for background blur. It is either one of: `convolution` (default), `kawase`.
+
Note: `kawase` only works with the `glx` backend.

*--blur-strength* 'LEVEL'::
Only valid for *--blur-method kawase*!
Expand Down
6 changes: 6 additions & 0 deletions src/compton.c
Original file line number Diff line number Diff line change
Expand Up @@ -6127,6 +6127,12 @@ get_cfg(session_t *ps, int argc, char *const *argv, bool first_pass) {
ps->o.track_leader = true;
}

// Blur method kawase is not compatible with the xrender backend
if (ps->o.backend != BKEND_GLX && ps->o.blur_method == BLRMTHD_KAWASE) {
printf_errf("(): Blur method 'kawase' is incompatible with the XRender backend. Fall back to default.\n");
ps->o.blur_method = BLRMTHD_CONV;
}

// Fill default blur kernel
if (ps->o.blur_background && (BLRMTHD_CONV == ps->o.blur_method) && !ps->o.blur_kerns[0]) {
// Convolution filter parameter (box blur)
Expand Down

0 comments on commit 964085c

Please sign in to comment.