diff options
author | Richard Grenville <pyxlcy@gmail.com> | 2014-04-21 22:45:27 +0800 |
---|---|---|
committer | Richard Grenville <pyxlcy@gmail.com> | 2014-04-21 22:45:27 +0800 |
commit | 5df42e8eb18437bdaa431b8fd5c422c66d67b75f (patch) | |
tree | e4089a88ff7a16ce4ca41f8b3c60f620709402b1 /compton.c | |
parent | 6a5738080a69b6978c81a257c4784ab67ce8de92 (diff) | |
download | tdebase-5df42e8eb18437bdaa431b8fd5c422c66d67b75f.tar.gz tdebase-5df42e8eb18437bdaa431b8fd5c422c66d67b75f.zip |
Bug fix #191: Add rounded-corners detection to --unredir-if-possible
Add `bounding_shape` and `rounded_corners` as condition match target.
Deprecate --shadow-ignore-shaped. Add rounded-corners detection to
win_is_fullscreen(). Slightly modify win_rounded_corners() logic. Thanks
to tdryer for reporting. (#191)
Diffstat (limited to 'compton.c')
-rw-r--r-- | compton.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -647,6 +647,8 @@ wid_get_prop_adv(const session_t *ps, Window w, Atom atom, long offset, */ static void win_rounded_corners(session_t *ps, win *w) { + w->rounded_corners = false; + if (!w->bounding_shaped) return; @@ -676,11 +678,9 @@ win_rounded_corners(session_t *ps, win *w) { for (i = 0; i < nrects; ++i) if (rects[i].width >= minwidth && rects[i].height >= minheight) { w->rounded_corners = true; - cxfree(rects); - return; + break; } - w->rounded_corners = false; cxfree(rects); } @@ -4483,10 +4483,15 @@ usage(int ret) { "--no-fading-openclose\n" " Do not fade on window open/close.\n" "--shadow-ignore-shaped\n" - " Do not paint shadows on shaped windows.\n" + " Do not paint shadows on shaped windows. (Deprecated, use\n" + " --shadow-exclude \'bounding_shaped\' or\n" + " --shadow-exclude \'bounding_shaped && !rounded_corners\' instead.)\n" "--detect-rounded-corners\n" " Try to detect windows with rounded corners and don't consider\n" - " them shaped windows.\n" + " them shaped windows. Affects --shadow-ignore-shaped,\n" + " --unredir-if-possible, and possibly others. You need to turn this\n" + " on manually if you want to match against rounded_corners in\n" + " conditions.\n" "--detect-client-opacity\n" " Detect _NET_WM_OPACITY on client windows, useful for window\n" " managers not passing _NET_WM_OPACITY of client windows to frame\n" |