From fd2dc3730c8ee7884df8651e1c5fa03750a68c20 Mon Sep 17 00:00:00 2001 From: dolio Date: Thu, 23 Sep 2004 07:17:48 +0000 Subject: Added command-line options for changing values relevant to fading. --- ChangeLog | 7 +++++++ xcompmgr.1 | 9 +++++++++ xcompmgr.c | 20 +++++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2058dfb..d04f4f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-09-23 Dan Doel + + * xcompmgr.1: + * xcompmgr.c: (usage), (main): + Added options -O -I and -D for controlling fading effects and + appropriate man entries, based on the patch by Johan Kiviniemi. + 2004-09-22 Dan Doel * xcompmgr.c: (run_fades), (solid_picture), (get_opacity_prop), diff --git a/xcompmgr.1 b/xcompmgr.1 index 6495932..0aabb4f 100644 --- a/xcompmgr.1 +++ b/xcompmgr.1 @@ -27,6 +27,15 @@ Specifies the left offset for client-side shadows. .BI \-t\ top-offset Specifies the top offset for client-side shadows. .TP +.BI \-I\ fade-in-step +Specifies the opacity change between steps while fading in. +.TP +.BI \-O\ fade-out-step +Specifies the opacity change between steps while fading out. +.TP +.BI \-D\ fade-delta +Specifies the time (in milliseconds) between steps in a fade. +.TP .BI \-a Automatic server-side compositing. This instructs the server to use the standard composition rules. Useful for debugging. diff --git a/xcompmgr.c b/xcompmgr.c index 01d9188..7dcbf75 100644 --- a/xcompmgr.c +++ b/xcompmgr.c @@ -1833,6 +1833,9 @@ usage (char *program) fprintf (stderr, " -o opacity\n Specifies the translucency for client-side shadows. (default .75)\n"); fprintf (stderr, " -l left-offset\n Specifies the left offset for client-side shadows. (default -15)\n"); fprintf (stderr, " -t top-offset\n Specifies the top offset for clinet-side shadows. (default -15)\n"); + fprintf (stderr, " -I fade-in-step\n Specifies the opacity change between steps while fading in. (default 0.028)\n"); + fprintf (stderr, " -O fade-out-step\n Specifies the opacity change between steps while fading out. (default 0.03)\n"); + fprintf (stderr, " -D fade-delta-time\n Specifies the time between steps in a fade in milliseconds. (default 10)\n"); fprintf (stderr, " -a\n Use automatic server-side compositing. Faster, but no special effects.\n"); fprintf (stderr, " -c\n Draw client-side shadows with fuzzy edges.\n"); fprintf (stderr, " -C\n Avoid drawing shadows on dock/panel windows.\n"); @@ -1868,12 +1871,27 @@ main (int argc, char **argv) char *display = 0; int o; - while ((o = getopt (argc, argv, "d:r:o:l:t:scnfFCaS")) != -1) + while ((o = getopt (argc, argv, "D:I:O:d:r:o:l:t:scnfFCaS")) != -1) { switch (o) { case 'd': display = optarg; break; + case 'D': + fade_delta = atoi (optarg); + if (fade_delta < 1) + fade_delta = 10; + break; + case 'I': + fade_in_step = atof (optarg); + if (fade_in_step <= 0) + fade_in_step = 0.01; + break; + case 'O': + fade_out_step = atof (optarg); + if (fade_out_step <= 0) + fade_out_step = 0.01; + break; case 's': compMode = CompServerShadows; break; -- cgit v1.2.3