options: remove --respect-prop-shadow

A quick search on GitHub showing the _COMPTON_SHADOW is actively being
used (most noteably, by polybar). It is not a difficult thing to support,
and it doesn't have that much runtime overhead. So remove the option
that guards this feature, make it enabled by default.

(Side note, I saw lots of people putting this option in their config
files, but this is actually a command line only option.)

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-10-22 20:44:59 +01:00
parent cdcdda8ed8
commit 2d28ab6032
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
6 changed files with 9 additions and 16 deletions

View File

@ -139,9 +139,6 @@ OPTIONS
*--use-ewmh-active-win*:: *--use-ewmh-active-win*::
Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, provided that the WM supports it. Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, provided that the WM supports it.
*--respect-prop-shadow*::
Respect '_COMPTON_SHADOW'. This a prototype-level feature, which you must not rely on.
*--unredir-if-possible*:: *--unredir-if-possible*::
Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows. Known to cause flickering when redirecting/unredirecting windows. *--paint-on-overlay* may make the flickering less obvious. Unredirect all windows if a full-screen opaque window is detected, to maximize performance for full-screen windows. Known to cause flickering when redirecting/unredirecting windows. *--paint-on-overlay* may make the flickering less obvious.

View File

@ -524,7 +524,6 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
.shadow_opacity = .75, .shadow_opacity = .75,
.shadow_blacklist = NULL, .shadow_blacklist = NULL,
.shadow_ignore_shaped = false, .shadow_ignore_shaped = false,
.respect_prop_shadow = false,
.xinerama_shadow_crop = false, .xinerama_shadow_crop = false,
.fade_in_step = 0.028, .fade_in_step = 0.028,

View File

@ -149,8 +149,6 @@ typedef struct options {
c2_lptr_t *shadow_blacklist; c2_lptr_t *shadow_blacklist;
/// Whether bounding-shaped window should be ignored. /// Whether bounding-shaped window should be ignored.
bool shadow_ignore_shaped; bool shadow_ignore_shaped;
/// Whether to respect _COMPTON_SHADOW.
bool respect_prop_shadow;
/// Whether to crop shadow to the very Xinerama screen. /// Whether to crop shadow to the very Xinerama screen.
bool xinerama_shadow_crop; bool xinerama_shadow_crop;

View File

@ -516,7 +516,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t
} }
// If _COMPTON_SHADOW changes // If _COMPTON_SHADOW changes
if (ps->o.respect_prop_shadow && ps->atoms->a_COMPTON_SHADOW == ev->atom) { if (ps->atoms->a_COMPTON_SHADOW == ev->atom) {
auto w = find_managed_win(ps, ev->window); auto w = find_managed_win(ps, ev->window);
if (w) { if (w) {
win_update_prop_shadow(ps, w); win_update_prop_shadow(ps, w);

View File

@ -168,10 +168,6 @@ static void usage(int ret) {
" Use _NET_WM_ACTIVE_WINDOW on the root window to determine which\n" " Use _NET_WM_ACTIVE_WINDOW on the root window to determine which\n"
" window is focused instead of using FocusIn/Out events.\n" " window is focused instead of using FocusIn/Out events.\n"
"\n" "\n"
"--respect-prop-shadow\n"
" Respect _COMPTON_SHADOW. This a prototype-level feature, which\n"
" you must not rely on.\n"
"\n"
"--unredir-if-possible\n" "--unredir-if-possible\n"
" Unredirect all windows if a full-screen opaque window is\n" " Unredirect all windows if a full-screen opaque window is\n"
" detected, to maximize performance for full-screen windows.\n" " detected, to maximize performance for full-screen windows.\n"
@ -635,7 +631,12 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
" from the command line options"); " from the command line options");
break; break;
P_CASEBOOL(276, use_ewmh_active_win); P_CASEBOOL(276, use_ewmh_active_win);
P_CASEBOOL(277, respect_prop_shadow); case 277:
// --respect-prop-shadow
log_warn("--respect-prop-shadow option has been deprecated, its "
"functionality will always be enabled. Please remove it "
"from the command line options");
break;
P_CASEBOOL(278, unredir_if_possible); P_CASEBOOL(278, unredir_if_possible);
case 279: case 279:
// --focus-exclude // --focus-exclude

View File

@ -738,7 +738,7 @@ static void win_determine_shadow(session_t *ps, struct managed_win *w) {
!w->rounded_corners) { !w->rounded_corners) {
log_debug("Shadow disabled by shadow-ignore-shaped"); log_debug("Shadow disabled by shadow-ignore-shaped");
shadow_new = false; shadow_new = false;
} else if (ps->o.respect_prop_shadow && w->prop_shadow == 0) { } else if (w->prop_shadow == 0) {
log_debug("Shadow disabled by shadow property"); log_debug("Shadow disabled by shadow property");
shadow_new = false; shadow_new = false;
} }
@ -2080,9 +2080,7 @@ void map_win_start(session_t *ps, struct managed_win *w) {
win_update_opacity_prop(ps, w); win_update_opacity_prop(ps, w);
// Check for _COMPTON_SHADOW // Check for _COMPTON_SHADOW
if (ps->o.respect_prop_shadow) { win_update_prop_shadow_raw(ps, w);
win_update_prop_shadow_raw(ps, w);
}
// Many things above could affect shadow // Many things above could affect shadow
win_determine_shadow(ps, w); win_determine_shadow(ps, w);