Add --no-ewmh-fullscreen
This arg reverts to the old behaviour of checking for fullscreen windows.
This commit is contained in:
parent
10d5c9b2f9
commit
93642e537f
|
@ -256,6 +256,9 @@ May also be one of the predefined kernels: `3x3box` (default), `5x5box`, `7x7box
|
||||||
*--benchmark-wid* 'WINDOW_ID'::
|
*--benchmark-wid* 'WINDOW_ID'::
|
||||||
Specify window ID to repaint in benchmark mode. If omitted or is 0, the whole screen is repainted.
|
Specify window ID to repaint in benchmark mode. If omitted or is 0, the whole screen is repainted.
|
||||||
|
|
||||||
|
*--no-ewmh-fullscreen*::
|
||||||
|
Do not use EWMH to detect fullscreen windows. Reverts to checking if a window is fullscreen based only on its size and coordinates.
|
||||||
|
|
||||||
FORMAT OF CONDITIONS
|
FORMAT OF CONDITIONS
|
||||||
--------------------
|
--------------------
|
||||||
Some options accept a condition string to match certain windows. A condition string is formed by one or more conditions, joined by logical operators.
|
Some options accept a condition string to match certain windows. A condition string is formed by one or more conditions, joined by logical operators.
|
||||||
|
|
|
@ -554,6 +554,7 @@ char *parse_config(options_t *opt, const char *config_file, bool *shadow_enable,
|
||||||
.focus_blacklist = NULL,
|
.focus_blacklist = NULL,
|
||||||
.detect_transient = false,
|
.detect_transient = false,
|
||||||
.detect_client_leader = false,
|
.detect_client_leader = false,
|
||||||
|
.no_ewmh_fullscreen = false,
|
||||||
|
|
||||||
.track_wdata = false,
|
.track_wdata = false,
|
||||||
.track_leader = false,
|
.track_leader = false,
|
||||||
|
|
|
@ -224,6 +224,9 @@ typedef struct options {
|
||||||
bool track_wdata;
|
bool track_wdata;
|
||||||
/// Whether compton needs to track window leaders.
|
/// Whether compton needs to track window leaders.
|
||||||
bool track_leader;
|
bool track_leader;
|
||||||
|
|
||||||
|
// Don't use EWMH to detect fullscreen applications
|
||||||
|
bool no_ewmh_fullscreen;
|
||||||
} options_t;
|
} options_t;
|
||||||
|
|
||||||
extern const char *const BACKEND_STRS[NUM_BKEND + 1];
|
extern const char *const BACKEND_STRS[NUM_BKEND + 1];
|
||||||
|
|
|
@ -355,6 +355,8 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
|
||||||
lcfg_lookup_bool(&cfg, "detect-transient", &opt->detect_transient);
|
lcfg_lookup_bool(&cfg, "detect-transient", &opt->detect_transient);
|
||||||
// --detect-client-leader
|
// --detect-client-leader
|
||||||
lcfg_lookup_bool(&cfg, "detect-client-leader", &opt->detect_client_leader);
|
lcfg_lookup_bool(&cfg, "detect-client-leader", &opt->detect_client_leader);
|
||||||
|
// --no-ewmh-fullscreen
|
||||||
|
lcfg_lookup_bool(&cfg, "no-ewmh-fullscreen", &opt->no_ewmh_fullscreen);
|
||||||
// --shadow-exclude
|
// --shadow-exclude
|
||||||
parse_cfg_condlst(&cfg, &opt->shadow_blacklist, "shadow-exclude");
|
parse_cfg_condlst(&cfg, &opt->shadow_blacklist, "shadow-exclude");
|
||||||
// --fade-exclude
|
// --fade-exclude
|
||||||
|
|
|
@ -315,7 +315,11 @@ static void usage(int ret) {
|
||||||
"\n"
|
"\n"
|
||||||
"--debug-mode\n"
|
"--debug-mode\n"
|
||||||
" Render into a separate window, and don't take over the screen. Useful\n"
|
" Render into a separate window, and don't take over the screen. Useful\n"
|
||||||
" when you want to attach a debugger to compton\n";
|
" when you want to attach a debugger to compton\n"
|
||||||
|
"\n"
|
||||||
|
"--no-ewmh-fullscreen\n"
|
||||||
|
" Do not use EWMH to detect fullscreen windows. Reverts to checking\n"
|
||||||
|
" if a window is fullscreen based only on its size and coordinates.\n";
|
||||||
FILE *f = (ret ? stderr : stdout);
|
FILE *f = (ret ? stderr : stdout);
|
||||||
fputs(usage_text, f);
|
fputs(usage_text, f);
|
||||||
#undef WARNING_DISABLED
|
#undef WARNING_DISABLED
|
||||||
|
@ -412,6 +416,7 @@ static const struct option longopts[] = {
|
||||||
{"monitor-repaint", no_argument, NULL, 800},
|
{"monitor-repaint", no_argument, NULL, 800},
|
||||||
{"diagnostics", no_argument, NULL, 801},
|
{"diagnostics", no_argument, NULL, 801},
|
||||||
{"debug-mode", no_argument, NULL, 802},
|
{"debug-mode", no_argument, NULL, 802},
|
||||||
|
{"no-ewmh-fullscreen", no_argument, NULL, 803},
|
||||||
// Must terminate with a NULL entry
|
// Must terminate with a NULL entry
|
||||||
{NULL, 0, NULL, 0},
|
{NULL, 0, NULL, 0},
|
||||||
};
|
};
|
||||||
|
@ -784,6 +789,7 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
|
||||||
P_CASEBOOL(800, monitor_repaint);
|
P_CASEBOOL(800, monitor_repaint);
|
||||||
case 801: opt->print_diagnostics = true; break;
|
case 801: opt->print_diagnostics = true; break;
|
||||||
P_CASEBOOL(802, debug_mode);
|
P_CASEBOOL(802, debug_mode);
|
||||||
|
P_CASEBOOL(803, no_ewmh_fullscreen);
|
||||||
default: usage(1); break;
|
default: usage(1); break;
|
||||||
#undef P_CASEBOOL
|
#undef P_CASEBOOL
|
||||||
}
|
}
|
||||||
|
|
|
@ -2179,7 +2179,7 @@ static inline bool win_is_fullscreen_xcb(xcb_connection_t *c, const struct atom
|
||||||
* It's not using w->border_size for performance measures.
|
* It's not using w->border_size for performance measures.
|
||||||
*/
|
*/
|
||||||
bool win_is_fullscreen(const session_t *ps, const struct managed_win *w) {
|
bool win_is_fullscreen(const session_t *ps, const struct managed_win *w) {
|
||||||
if(win_is_fullscreen_xcb(ps->c, ps->atoms, w->client_win))
|
if(!ps->o.no_ewmh_fullscreen && win_is_fullscreen_xcb(ps->c, ps->atoms, w->client_win))
|
||||||
return true;
|
return true;
|
||||||
return rect_is_fullscreen(ps, w->g.x, w->g.y, w->widthb, w->heightb) &&
|
return rect_is_fullscreen(ps, w->g.x, w->g.y, w->widthb, w->heightb) &&
|
||||||
(!w->bounding_shaped || w->rounded_corners);
|
(!w->bounding_shaped || w->rounded_corners);
|
||||||
|
|
Loading…
Reference in New Issue