Le 13/04/2023 à 21:25, Quentin Barnes a écrit :
On Tue, Apr 11, 2023 at 11:14:48PM +0200, Maxime Soulé wrote:
for example. In this case, we fall into the case where Xrandr is not used,
so the layout defaults to root coordinates, so always one monitor.
This brought up a question to myself of how to handle the *MONITOR*
variables when no xrandr.  The problem with just not generating
them and leaving them undefined would force people to do a lot of
ifdef'ing in their .ctwmrc.  Not very user friendly.

Since you're already setting Scr->Layout to some sane values, I
should just use those for generating default values for the macros.
So in my triple monitor use case with no xrandr, the macros look
like this:
define(`XRR_MONITOR_COUNT', `1')
define(`XRR_MONITOR_0', `')
define(`XRR_MONITOR_0_WIDTH', `7360')
define(`XRR_MONITOR_0_HEIGHT', `2160')
define(`XRR_MONITOR_0_X', `0')
define(`XRR_MONITOR_0_Y', `0')



I think "XRR_" is a good prefix.  With not abbreviating "MONITOR",
the macro names are already long enough!

I agree with XRR_ prefix, but I have no opinion about removing or not the
following MONITOR_ word.
It was not about removing, but abbreviating. Instead of
"XRR_MONITOR_..." I was considering "XRR_MON_...".  I like
"XRR_MONITOR_..." better.

Ok, with all the additional review comments and testing, I have an
updated commit.  Note that I did some rebasing, so for a local repo
copy, make sure you do a "git pull -r" when updating.  Branch is
"monitor_vars".  Latest changes in:

I also fixed a crash in RLayoutGetNameIndex() when no xrandr with
names being NULL.  The fixed version is here:

Let me know if you have any additional comments and what's next.

Looks good to me, just run "make indent" to conform to the repo style (you will see session.c is badly formatted, do not include its changes in your commits).

The next step is an approval of a committer like Matthew Fuller or Rhialto/Olaf.



Reply via email to