Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Title bar scale-unaware #517

Closed
HowellBP opened this issue Feb 10, 2016 · 14 comments
Closed

Title bar scale-unaware #517

HowellBP opened this issue Feb 10, 2016 · 14 comments

Comments

@HowellBP
Copy link

Windows 10 Home x64, mintty 2.2.2 (part of cygwin x64)
http://imgur.com/a/fmU6T

I have a laptop with a 4k display set to 250% zoom (1536x864 effective, according to YouTube). I have a 1920x1200 display connected set at 100% zoom. When moving between screens or opening the terminal on the external display, the title bar is ENORMOUS. For comparison, I included shots of Mozilla Firefox which is DPI-aware and scales accordingly with the monitor resolution.

This may be related to issue #492. This also may be a broader Windows 10 issue, as some programs scale properly (Firefox, Chrome, Windows Explorer) while others do not (Snipping Tool).

@mintty
Copy link
Owner

mintty commented Feb 11, 2016

Which setting do you mean by "zoom"? DPI? You aren't actually driving the 4K monitor with reduced resolution (1536x864)?? Anyway, the problem is on the other monitor.
If you start a new mintty from there (command line of previous instance), is the title bar still as big?
What if you hold Shift while moving the window over (compare issue #487)?
Since 2.2.1, mintty is basically "DPI-aware" (see issue #470). It may take a while until this problem gets analysed...

@HowellBP
Copy link
Author

Windows 8 and 10 call the dynamic DPI scaling "zoom" in their settings. The display is driven at the native resolution (3840x2160) but the DPI "zoom" is 250% making the effective resolution 1536x864. When translating the mintty window from this display to the 1920x1200 display, the title bar retains the "zoomed" DPI, making it 250% larger than title bars of other windows. See the image link in the first post for examples.

I haven't tried holding shift yet, I'll do that next and let you know the result.

@HowellBP
Copy link
Author

Update: starting mintty on the other monitor has no effect. Holding Shift while dragging the window to the other monitor has no effect.

If there's anything else I can do to test, please let me know. I can also record a video of the effect between monitors.

@mintty
Copy link
Owner

mintty commented Feb 17, 2016

By "no effect" you mean it looks normal, or it looks too big, too, as in the screenshots?
Any change if you set both monitors to 100% DPI factor ("zoom")?

@HowellBP
Copy link
Author

"no effect" means that pressing the shift key or starting mintty on the other screen did not change the result. The title bar is still huge like in the screenshots.

Setting the DPI scale factor to 100% results in a "normal"-looking mintty window on the 1920x1200 display, with correct title bar size. Unfortunately this makes the Windows desktop nearly unusable on the 4k display.

@swyant
Copy link

swyant commented Mar 14, 2016

I'm seeing the exact same behavior on Windows 8 using mintty 2.2.3. Additionally, I did not have this problem using an older version of mintty. I don't know which version I was previously using; it was whatever came with Cygwin when I downloaded it in June 2015. (I already deleted all past Cygwin-related files to do a complete uninstall.) So something in the newer version is causing this problem.

@mintty
Copy link
Owner

mintty commented Mar 14, 2016

The behaviour may have been introduced with 2.2.1. If you can verify this (by compiling both 2.2.1 and 2.1.5) that might be helpful. However, someone will still have to find out how to tweak the individual window title bar.

@swyant
Copy link

swyant commented Mar 14, 2016

Yep, compiled both. The issue appears with 2.2.1 and does not exist in 2.1.5.

@retorillo
Copy link

I encountered a same problem. mintty's title bar becomes huge and characters becomes tiny on the second screen.

Environment

  • Windows 10
  • mintty 2.2.3
  • Main screen scale factor: 200% (Surface Pro 4)
  • Second screen scale factor: 125%

Workaround

Though I don't know whether this solution is optimal, I could fix by using Process_System_DPI_Aware instead of Process_Per_Monitor_DPI_Aware on my environment. Maybe this problem is related with this.

// winmain.c#L161
// HRESULT hr = pSetProcessDpiAwareness(Process_Per_Monitor_DPI_Aware);
HRESULT hr = pSetProcessDpiAwareness(Process_System_DPI_Aware);

HRESULT hr = pSetProcessDpiAwareness(Process_Per_Monitor_DPI_Aware);

Thank you for maintaining lovely terminal!!

@mintty
Copy link
Owner

mintty commented Mar 30, 2016

@espresso3389 please: does this modified patch still solve issue #470?

@mintty
Copy link
Owner

mintty commented May 2, 2016

See my comment #547 (comment) in #547;
sorry for proceeding in the duplicate rather than the original report :) but I'm closing this one now.

@mintty mintty closed this as completed May 2, 2016
@mintty
Copy link
Owner

mintty commented Sep 8, 2016

Released revised DPI handling in 2.5.1; EnableNonClientDpiScaling is being used as documented but it does not work.

@mintty
Copy link
Owner

mintty commented Sep 12, 2016

This issue is finally resolved, #588.

@mintty
Copy link
Owner

mintty commented Sep 19, 2016

Released 2.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants