Confusing Cygwin X / xlaunch issue

Jon Turney
Tue Oct 26 15:02:35 GMT 2021

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?

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.

> It seems that, at the least, I need to *start* X when the laptop (hi-res)
> display is main.  I'm less clear as to whether I need to *boot* with it 
> main
> (I can try that later).
> Is there an explanation for this?  Should I be doing something differently?
> Is there a bug?  Thanks for any insight you can offer!  Eliot Moss

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.

More information about the Cygwin mailing list