From eb17ad8adc9400f6ed252872f13ccf5551f9e2e9 Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Thu, 28 Feb 2013 12:01:53 -0800 Subject: [PATCH] Print spaces between XA_ATOM property values Commit b26fd532b3dab222956ea27eef4e41345978b5b2 redid how xrandr prints properties. It neglected to put spaces between the values of XA_ATOM properties, so they all run together. For example, audio: auto supported: force-dvioffautoon Fix this by putting a space after each atom name. In addition, some drivers create property values with spaces in them, so put commas between entries to disambiguate. For example, Broadcast RGB: Automatic supported: Automatic, Full, Limited 16:235 Do the same for properties with multiple valid ranges. Signed-off-by: Aaron Plattner Reviewed-by: Peter Hutterer --- xrandr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xrandr.c b/xrandr.c index 0e3818f..305308c 100644 --- a/xrandr.c +++ b/xrandr.c @@ -3560,6 +3560,8 @@ main (int argc, char **argv) print_output_property_value (False, 32, actual_type, (unsigned char *) &(propinfo->values[k * 2 + 1])); printf (")"); + if (k < propinfo->num_values / 2 - 1) + printf (", "); } printf ("\n"); } @@ -3570,6 +3572,8 @@ main (int argc, char **argv) { print_output_property_value (False, 32, actual_type, (unsigned char *) &(propinfo->values[k])); + if (k < propinfo->num_values - 1) + printf (", "); } printf ("\n"); } -- 2.32.0.93.g670b81a890