With DPI settings to SYSTEM ENHANCED & theme enabled, tabs disappear when Windows resolution is anything but 100%
Describe the bug I'm using 2024-06 and 2024-09 on a 4K 32" panel with high DPI settings set to "System Enhanced" in my Windows, but when I enable 'theme' and I hover my mouse over tabs, they disappear and sometimes only reappear when I move it outside (and sometimes they don't reappear at all). My screen resolution is set to 150% (as suggested by Windows 10/11 - however, I don't think this is Windows version problem). Btw, I have been experiencing this problem for last several years. Please refer to the screenshot.
To be clear, this only happens when high DPI setting is set to SYSTEM ENHANCED (not SYSTEM, not APPLICATION) and when the theme is enabled and resolution is 150% (too many variables, but this is the right combination).
To Reproduce
- Set Windows resolution to 150% (or any resolution other than 100%)
- Enable theme in Eclipse - doesn't matter what theme you choose - all you need is to have that checkbox checked.
- Set high DPI setting to 'System Enhanced' in Windows for Eclipse.exe.
Expected behavior With above 3 things in place, I want Eclipse to not hide tabs.
Screenshots
Environment:
- Select the platform(s) on which the behavior is seen:
-
- [ ] All OS
-
- [x] Windows
-
- [ ] Linux
-
- [ ] macOS
-
Additional OS info (e.g. OS version, Linux Desktop, etc)
-
JRE/JDK version
Version since Like forever
Workaround (or) Additional context
- With scaling set to 150% and theme enabled, the first workaround is to use high DP setting set to either 'system' or 'application', but I don't want it. Instead, I like to set it to 'system enhanced' as it makes everything so sharp and good.
- The other workaround is to use scaling to 100% when using DPI setting set at 'system enhanced', but then everything becomes to tiny.
I could not reproduce with master. please test with M2: https://download.eclipse.org/eclipse/downloads/drops4/S-4.34M2-202410172140/ And also please edit the issue to clean it up from template.
I can reproduce this. OP needs to make steps to reproduce clearer. "With high DPI settings set to "System Enhanced" is the key part. See here.
I use system because system enhanced worked poorly as this issue described.
@merks @Phillipus @jukzi - Sorry for not being able to explain the issue correctly. I just went ahead and modified the 'title' and the 'description'. Thank you for looking into it.
Unfortunately, there are several DPI-related settings that you can change and combine. The Windows modes "System" and "Application" both work fine (to some extent and depending on what you consider "fine") with Eclipse and both have their advantages and drawbacks. When you download an Eclipse product, it defaults to "System" while common JREs usually default to run their applications in "Application" mode (which is what usually happens when you launch an Eclipse application from within an Eclipse SDK). "System (enhanced)", however, seems to be rarely used and is probably not well tested.
We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3), so that you can try out the feature in the upcoming release. Please do not expect it to be perfect yet (which is why we will tag it as "experimental"), but we should then rather put efforts into this improved HiDPI support than working on glitches with other, rarely used modes.
@HeikoKlare - Thank you for your comemnt.
I'm using 2024-09 and I can see a 'Light Preview' option in Eclipse. Now even with this option selected and HiDPI set to Application or System, and scaling set to 150%, everything appears very small (The menubar icons, the new search dialog etc). I don't know, but for me, the best experience on a 4k 32" monitor with scaling set to 150% is when hiDPI set to System Enhanced.
We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3)
Is it the same Light Preview option I see in 2024-09?
I'm using 2024-09 and I can see a 'Light Preview' option in Eclipse. Now even with this option selected and HiDPI set to Application or System, and scaling set to 150%, everything appears very small (The menubar icons, the new search dialog etc). I don't know, but for me, the best experience on a 4k 32" monitor with scaling set to 150% is when hiDPI set to System Enhanced.
This is something you should be able to improve with the following setting added to your eclipse.ini:
-Dswt.autoScale=quarter
The following screenshot shows the difference: left is with that option and right is without (default):
We are working on enhanced HiDPI support for Windows in Eclipse SWT that is supposed to make all of this obsolete. It will always use "Application" mode (more specifically: PerMonitorV2) and perform according in-application, per-monitor scaling. We plan to provide an Eclipse preference to experimentally activate this feature in the next week (until M3)
Is it the same Light Preview option I see in 2024-09?
It is a different option, not related to the new/preview theme. I have just pushed the according news for the feature, so you can best have a look there: https://eclipse.dev/eclipse/news/4.34/platform.php#rescale-on-runtime-preference It will be available in 2024-12 (starting from the milestone 3 build).
@HeikoKlare I'm back with some more details. I installed this version - Version: 2024-12 (4.34.0) Build id: 20241128-0757 and enabled monitor-specific scaling. Unfortunately, there seems to be a bug. Let me explain. I have two 32" 4K monitors; one is placed in landscape mode and the other in portrait (flipped) mode. The high DPI setting is set to "Application," and the one in portrait mode is my main display. So, when I enable monitor-specific scaling and start Eclipse, it starts on this monitor, and things work, but the moment I drag it to landscape mode monitor, all the "right click menus" go off. LMK if you like to see the screenshot. Below is my eclipse.ini
-startup plugins/org.eclipse.equinox.launcher_1.6.900.v20240613-2009.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.2.1100.v20240722-2106 -product org.eclipse.epp.package.jee.product -showsplash org.eclipse.epp.package.common --launcher.defaultAction openFile --launcher.appendVmargs -vm plugins/org.eclipse.justj.openjdk.hotspot.jre.full.win32.x86_64_21.0.5.v20241023-1957/jre/bin -vmargs -XX:CompileCommand=exclude org.eclipse.jdt.internal.core.dom.rewrite.ASTRewriteAnalyzer::getExtendedRange -Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclientjava -Dosgi.requiredJavaVersion=21 [email protected]/eclipse-workspace -Dosgi.dataAreaRequiresExplicitInit=true -Dorg.eclipse.swt.graphics.Resource.reportNonDisposed=true -Declipse.e4.inject.javax.warning=false -Dsun.java.command=Eclipse -Xms256m -Xmx2048m -XX:+UseG1GC -XX:+UseStringDeduplication --add-modules=ALL-SYSTEM -Djava.security.manager=allow -Djavax.net.ssl.trustStoreType=Windows-ROOT -Djavax.net.ssl.trustStore=NONE
Could you test without any high DPI specific settings, i.e., without checking the box to overwrite the high DPI behavior of the application in any way? Then the box to select the "Application" option should be disabled.
Still, we know about some issues with placements (including context menus), but they are usually limited to the case that different monitors have different scale values. I guess that both your monitors use the same scale value, don't they? Maybe it is related to using one of the monitors in flipped mode.
It would be great if you can provide a screenshot. That could help us identify the cause and potentially fix the issue.
@HeikoKlare - I was wrong. The right-click menus or top menus do not appear at the correct location when I have the below setting set and when the main display is portrait. I don't think it has anything to do with the 'DPI setting' or 'monitor-specific scaling' or 'theme.' All 3 checkboxes were unchecked in my testing, yet I could reproduce the issue.
Eclipse starts on portrait display, and menus appear in the correct locations. The moment I drag it, things go wrong. 80% of the time, when I right-click, the menu doesn't open where it should. It only works 20% of the time.
It's purely a function of the below setting and the main monitor being set to portrait position. Sorry for all this confusion.
-Dswt.autoScale=quarter
Yes! Both monitors use the same scale (150% Windows scaling).
Thank you for all the additional information, @hellorsanjeev! The issue with the context menu placement might be the same as reported in #2595 and fixed with #1630. So I would expect the issue to not be present in recent builds anymore. But to confirm this and ensure that we are not missing any further issue, would it be possible for you to test a recent Eclipse build, such as the last milestone build? https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/S-4.35M1-202501021800/eclipse-platform-4.35M1-win32-x86_64.zip
@hellorsanjeev is this issue still relevant, in particular with the monitor-specific scaling feature we have now, or can we close this issue?