From ed6a96dae997727113a568789085f100d17da7a0 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Wed, 23 Oct 2019 20:23:21 +0100 Subject: [PATCH] options: add --no-vsync command line option Otherwise there is no way to override the settings in the config file. Signed-off-by: Yuxuan Shui --- man/compton.1.asciidoc | 6 +++--- src/options.c | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/man/compton.1.asciidoc b/man/compton.1.asciidoc index 59c05ea..7e0d9d9 100644 --- a/man/compton.1.asciidoc +++ b/man/compton.1.asciidoc @@ -130,8 +130,8 @@ OPTIONS *--refresh-rate* 'REFRESH_RATE':: Specify refresh rate of the screen. If not specified or 0, compton will try detecting this with X RandR extension. -*--vsync*:: - Enable VSync. +*--vsync*, *--no-vsync*:: + Enable/disable VSync. *--sw-opti*:: Limit compton to repaint at most once every 1 / 'refresh_rate' second to boost performance. This should not be used with *--vsync* drm/opengl/opengl-oml as they essentially does *--sw-opti*'s job already, unless you wish to specify a lower refresh rate than the actual value. @@ -166,7 +166,7 @@ OPTIONS *--detect-client-leader*:: Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if *--detect-transient* is enabled, too. -*--blur-method, --blur-size, --blur-deviation*:: +*--blur-method*, *--blur-size*, *--blur-deviation*:: Parameters for background blurring, see the *BLUR* section for more information. *--blur-background*:: diff --git a/src/options.c b/src/options.c index 7ea485e..192933f 100644 --- a/src/options.c +++ b/src/options.c @@ -411,6 +411,7 @@ static const struct option longopts[] = { {"log-file", required_argument, NULL, 322}, {"use-damage", no_argument, NULL, 323}, {"no-use-damage", no_argument, NULL, 324}, + {"no-vsync", no_argument, NULL, 325}, {"experimental-backends", no_argument, NULL, 733}, {"monitor-repaint", no_argument, NULL, 800}, {"diagnostics", no_argument, NULL, 801}, @@ -789,6 +790,9 @@ void get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable, case 324: opt->use_damage = false; break; + case 325: + opt->vsync = false; + break; P_CASEBOOL(733, experimental_backends); P_CASEBOOL(800, monitor_repaint); case 801: opt->print_diagnostics = true; break;