TrafficMonitor icon indicating copy to clipboard operation
TrafficMonitor copied to clipboard

Taskbar Window DPI scale does not revert after removing external display

Open numbfall opened this issue 2 years ago • 4 comments

I am on a surface laptop with high DPI screen. When I connect an external display the Taskbar Window traffic monitor scales correctly to the external display DPI. But when I remove the external display, the traffic monitor does not revert back to the original scaling.

Before: Screenshot 2021-10-21 135656

After: Screenshot 2021-10-21 133052

Is there a way I can reset or redraw the app manually? So far, I can only fix it by restarting windows. Exiting the app and restarting the app does not fix the problem. Neither does changing the font size or any options on the Taskbar Window settings. Restarting the Windows Explorer also does not fix the issue.

EDIT:

The reverse is also true - connecting the external display first and removing it makes the taskbar monitor scale, but reconnecting the external monitor does not revert the scale. It stays permanently like this:

Screenshot 2021-10-24 165656

numbfall avatar Oct 21 '21 09:10 numbfall

There is indeed some problems when the display DPI changed. But it should be fixed after the app is restarted. I will investigate this problem.

zhongyang219 avatar Oct 28 '21 12:10 zhongyang219

can a restart option at least be added, so until its fixed I don't need to exit and open the program again, but just right click and click restart. Thanks

nochlab1 avatar Nov 12 '21 08:11 nochlab1

If the program is set to be DPIAware, the WM_DPICHANGED event or similar should be available from the main event loop when the DPI changes. https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows https://docs.microsoft.com/en-us/windows/win32/api/_hidpi/ https://github.com/tringi/win32-dpi

kevintsq avatar Jul 03 '22 15:07 kevintsq

If the program is set to be DPIAware, the WM_DPICHANGED event or similar should be available from the main event loop when the DPI changes. https://docs.microsoft.com/en-us/windows/win32/hidpi/high-dpi-desktop-application-development-on-windows https://docs.microsoft.com/en-us/windows/win32/api/_hidpi/ https://github.com/tringi/win32-dpi

I think this program is already set to be 'DPIAware'. See this. image However, Windows does NOT send 'WM_DPICHANGED' message to TaskBarDlg window. So I have to check DPI per a second to make sure the TaskBarDlg window DPI is same as the DPI of the screen on which the window is located.

BombaxCeiba avatar Jul 05 '22 05:07 BombaxCeiba