Re: Monitor attributes on Windows 11/WSL2

Eli Zaretskii <[email protected]> Sat, 01 Aug 2026 14:58:56 +0300
Newsgroups gmane.emacs.devel
Message-ID <[email protected]>
> Date: Sat, 1 Aug 2026 13:11:22 +0200
> Cc: [email protected]
> From: martin rudalics <[email protected]>
> 
>  > Martin, any suggestions or ideas?
> 
> Not really.  "0 0" is not useful, maybe we should suppress mm-size when
> there's no way to obtain it.  It might also be interesting whether xrandr
> lists that monitor under rdp or rdp0 and does return mm sizes.

The code which uses mm-size in our code base seems to assume without
checking that the value is non-zero.  So I wonder how this particular
platform violates the assumption that held since time immemoriam.
Which code is responsible for asking X to provider these values, and
why does it not work in this case?  I tried to answer this question
myself, but was surprised to see the relevant variables set only under
one particular combination of toolkit and use of XRandr.  I'm probably
missing something.

We don't officially support WSL, so we could just say that.  But it
would be nice to have a better understanding of what APIs fail us in
this case.  Can you perhaps point to the relevant code, so Arash could
then try working with that user to find out what goes wrong?

TIA