For debugging I need to run another fvwm in xnest, but that
doesn't support randr.

The attached patch mocks up a global monitor to use if init fails.
It works at the first glance, but the patch is not very clean.
Please comment.

Ciao

Dominik ^_^  ^_^

--

Dominik Vogt
From 4201211293560a2a4f0a8636c36f3d5b37245175 Mon Sep 17 00:00:00 2001
From: Dominik Vogt <dominik.v...@gmx.de>
Date: Fri, 19 Nov 2021 02:12:16 +0100
Subject: [PATCH] Fake a global monitor when RandR is not available.

---
 libs/FScreen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/FScreen.c b/libs/FScreen.c
index f9fb11d2..e00af438 100644
--- a/libs/FScreen.c
+++ b/libs/FScreen.c
@@ -555,9 +555,9 @@ void FScreenInit(Display *dpy)
 	XRRFreeScreenResources(res);

 	scan_screens(dpy);
+  no_randr:
 	is_tracking_shared = false;

-  no_randr:
 	if (!is_randr_present)
 	{
 		fprintf(stderr, "Unable to initialise RandR\n");
--
2.30.2

Reply via email to