diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2005-10-06 10:03:08 +0000 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2005-10-06 10:03:08 +0000 |
commit | 35e7414c6e4505b2e71be0e54ed0c7ff74f39db1 (patch) | |
tree | 4f6d06dc9be82258f08ee75bc602f1f41366c1df | |
parent | 938ff7de3f2bc4979bbf8a5f68190cde2be12696 (diff) |
Tell the user when setting the screen configuration fails. Return nonzeroXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901
so scripts can find out too.
-rw-r--r-- | xrandr.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -106,6 +106,7 @@ main (int argc, char **argv) int reflection = 0; int width = 0, height = 0; int have_pixel_size = 0; + int ret = 0; program_name = argv[0]; if (argc == 1) query = 1; @@ -330,6 +331,12 @@ main (int argc, char **argv) (SizeID) size, (Rotation) (rotation | reflection), rate, CurrentTime); XRRQueryExtension(dpy, &event_base, &error_base); + + if (setit && status == RRSetConfigFailed) { + printf ("Failed to change the screen configuration!\n"); + ret = 1; + } + if (verbose && setit) { if (status == RRSetConfigSuccess) { @@ -373,5 +380,5 @@ main (int argc, char **argv) } } XRRFreeScreenConfigInfo(sc); - return(0); + return(ret); } |