[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.
From: |
Mathieu OTHACEHE |
Subject: |
[RP] [PATCH 3/6] Disable sfdump if there is no xrandr support. |
Date: |
Fri, 25 Nov 2016 15:35:20 +0100 |
Without xrandr support, sfdump command has no interest.
---
src/actions.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/actions.c b/src/actions.c
index 77d5cee..faddbd1 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -5599,12 +5599,17 @@ cmd_set (int interactive UNUSED, struct cmdarg **args)
cmdret *
cmd_sfdump (int interactively UNUSED, struct cmdarg **args UNUSED)
{
+#ifdef HAVE_XRANDR
char screen_suffix[16];
cmdret *ret;
struct sbuf *dump;
rp_frame *cur_frame;
rp_screen *cur_screen;
+ if (!rp_have_xrandr) {
+ return cmdret_new (RET_FAILURE, "sfdump: no xrandr support");
+ }
+
dump = sbuf_new (0);
list_for_each_entry (cur_screen, &rp_screens, node)
@@ -5629,6 +5634,9 @@ cmd_sfdump (int interactively UNUSED, struct cmdarg
**args UNUSED)
ret = cmdret_new (RET_SUCCESS, "%s", sbuf_get (dump));
sbuf_free (dump);
return ret;
+#else
+ return cmdret_new (RET_FAILURE, "sfdump: no xrandr support");
+#endif
}
cmdret *
--
2.10.0
- [RP] [PATCH 0/6] Fix multiple monitors commands, Mathieu OTHACEHE, 2016/11/25
- [RP] [PATCH 1/6] Expose xrandr functions to find a screen by output or crtc number, Mathieu OTHACEHE, 2016/11/25
- [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.,
Mathieu OTHACEHE <=
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Jeremie Courreges-Anglas, 2016/11/26
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Mathieu OTHACEHE, 2016/11/27
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Jeremie Courreges-Anglas, 2016/11/27
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Mathieu OTHACEHE, 2016/11/27
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Jeremie Courreges-Anglas, 2016/11/27
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Mathieu OTHACEHE, 2016/11/28
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., |cos|, 2016/11/27
- Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support., Mathieu OTHACEHE, 2016/11/28
[RP] [PATCH 2/6] Use xrandr output identifiers in sselect., Mathieu OTHACEHE, 2016/11/25
[RP] [PATCH 5/6] Kill gcc uninitialized warning, Mathieu OTHACEHE, 2016/11/25