Improvement: Dynamic blur strength & improved frame blur performance

- Remove the region expansion design in win_blur_background(). I must be
  sleep-walking when I wrote that!

- Improve performance of blurring when a window is opaque but its frame
  is transparent.

- Adjust blur strength according to window opacity.
  --blur-background-fixed restores the old behavior.

- Add "use_offset" parameter to a few functions for convenience. Code
  clean-up.
This commit is contained in:
Richard Grenville
2012-12-15 20:07:45 +08:00
parent 22cabf7c89
commit 1bfe21efb5
3 changed files with 73 additions and 38 deletions

View File

@ -335,6 +335,9 @@ typedef struct {
/// Whether to blur background when the window frame is not opaque.
/// Implies blur_background.
bool blur_background_frame;
/// Whether to use fixed blur strength instead of adjusting according
/// to window opacity.
bool blur_background_fixed;
// === Focus related ===
/// Consider windows of specific types to be always focused.
@ -1493,11 +1496,17 @@ root_tile_f(session_t *ps);
static void
paint_root(session_t *ps, Picture tgt_buffer);
static XserverRegion
win_get_region(session_t *ps, win *w, bool use_offset);
static XserverRegion
win_get_region_noframe(session_t *ps, win *w, bool use_offset);
static XserverRegion
win_extents(session_t *ps, win *w);
static XserverRegion
border_size(session_t *ps, win *w);
border_size(session_t *ps, win *w, bool use_offset);
static Window
find_client_win(session_t *ps, Window w);