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:
parent
cdcdda8ed8
commit
2d28ab6032
|
@ -139,9 +139,6 @@ OPTIONS
|
|||
*--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.
|
||||
|
||||
*--respect-prop-shadow*::
|
||||
Respect '_COMPTON_SHADOW'. This a prototype-level feature, which you must not rely on.
|
||||
|
||||
*--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.
|
||||
|
||||
|
|
|
@ -524,7 +524,6 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
|
|||
.shadow_opacity = .75,
|
||||
.shadow_blacklist = NULL,
|
||||
.shadow_ignore_shaped = false,
|
||||
.respect_prop_shadow = false,
|
||||
.xinerama_shadow_crop = false,
|
||||
|
||||
.fade_in_step = 0.028,
|
||||
|
|
|
@ -149,8 +149,6 @@ typedef struct options {
|
|||
c2_lptr_t *shadow_blacklist;
|
||||
/// Whether bounding-shaped window should be ignored.
|
||||
bool shadow_ignore_shaped;
|
||||
/// Whether to respect _COMPTON_SHADOW.
|
||||
bool respect_prop_shadow;
|
||||
/// Whether to crop shadow to the very Xinerama screen.
|
||||
bool xinerama_shadow_crop;
|
||||
|
||||
|
|
|
@ -516,7 +516,7 @@ static inline void ev_property_notify(session_t *ps, xcb_property_notify_event_t
|
|||
}
|
||||
|
||||
// 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);
|
||||
if (w) {
|
||||
win_update_prop_shadow(ps, w);
|
||||
|
|
|
@ -168,10 +168,6 @@ static void usage(int ret) {
|
|||
" Use _NET_WM_ACTIVE_WINDOW on the root window to determine which\n"
|
||||
" window is focused instead of using FocusIn/Out events.\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"
|
||||
" Unredirect all windows if a full-screen opaque window is\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");
|
||||
break;
|
||||
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);
|
||||
case 279:
|
||||
// --focus-exclude
|
||||
|
|
|
@ -738,7 +738,7 @@ static void win_determine_shadow(session_t *ps, struct managed_win *w) {
|
|||
!w->rounded_corners) {
|
||||
log_debug("Shadow disabled by shadow-ignore-shaped");
|
||||
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");
|
||||
shadow_new = false;
|
||||
}
|
||||
|
@ -2080,9 +2080,7 @@ void map_win_start(session_t *ps, struct managed_win *w) {
|
|||
win_update_opacity_prop(ps, w);
|
||||
|
||||
// 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
|
||||
win_determine_shadow(ps, w);
|
||||
|
|
Loading…
Reference in New Issue