Confusing Cygwin X / xlaunch issue

Eliot Moss moss@cs.umass.edu
Tue Oct 26 15:38:13 GMT 2021


On 10/26/2021 4:02 PM, Jon Turney wrote:
> On 24/10/2021 12:01, Eliot Moss wrote:
>> First, things work fine when I am using just my hi-res laptop display, or that
>> display plus a hi-res external display in "Extend these displays" mode
>> according to Windows 10.  At present I am using a lower resolution external
>> display (becaue I am on an extended trip and it's what I have) in "Extend
>> these displays" mode with my hi-res laptop display.  This seems to confuse X
>> (and also xlaunch?).  Here are the issues:
> 
> Thanks for reporting this problem.

>> When booted with the external lo-res display as the main display:
>>
>> - xterm windows come up with a very large font.
>> - The X menu (controlled by .XWinrc) does not come up.
> 
> This means that you're right-clicking on the notification area icon, but no menu appears?

Correct.

> If so, I guess this means that we're getting confused about where to place the menu, but I'm not 
> sure how that could happen.

> wrt the font scaling issue, looking at the source, it seems that we don't re-consider the display 
> dpi after a WM_DISPLAYCHANGE message, but keep on using the value determined at startup.  This is 
> probably a bug.
> 
>  > winInitializeScreenDefaults - primary monitor w 3240 h 2160
>  > winInitializeScreenDefaults - native DPI x 192 y 192
> [...]
>  > [  1035.750] winWindowProc - WM_DISPLAYCHANGE - new width: 2560 new height: 2048 new bpp: 32
> 
> As a workaround, you might experiment with using the xserver option '-dpi' to set a value 
> corresponding to your hi-res display, so that will be used even if the normal-res display is 
> Windows' primary monitor.

That didn't hurt at least.  I did not go to the trouble of rebooting,
but given that I had booted to the hi-res Window and then started X
with the lo-res as primary, the font scaling was right.  The menu still
did not come up, though.  That seems to require starting X with the
hi-res Window - the one that was primary when Windows was booted.

Regards - Eliot


More information about the Cygwin mailing list