Bug 569561 - UI does not correctly process X11 xrdb Xft.dpi resourse
Summary: UI does not correctly process X11 xrdb Xft.dpi resourse
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.17   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2020-12-08 14:22 EST by Kent Dorfman CLA
Modified: 2020-12-10 14:10 EST (History)
1 user (show)

See Also:


Attachments
aout-config (554.17 KB, text/plain)
2020-12-08 15:53 EST, Kent Dorfman CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kent Dorfman CLA 2020-12-08 14:22:54 EST
Dual monitors with differing DPI: small monitor is 96dpi, and large is 48dpi...

THIS IS NOT a twinview configuration.  It is a distinct DISPLAY for each physical monitor.

Xresource file properly specified the following:

! screen 0 resources
#if SCREEN_NUM == 0
*Xft.dpi:       96
#endif

! screen 1 resources
#if SCREEN_NUM == 1
*Xft.dpi:       48
#endif

yet eclipse IDE GUI does not process the correct Xft.dpi value.

However, manually forcing the resource as follows:

echo "*Xft.dpi: 48" | xrdb -merge -

and then running eclipse only half fixes the problem because then BOTH monitors are using the 48dpi value.  which breaks the scaling on the secondary monitor...Either Java or eclipse itself is NOT processing the X resources correctly from the resource database in dual-screen mode.


I do NOT use gnome, kde, or any other other bloated desktop environments.  This  X11 running openbox on each display.
Comment 1 Andrey Loskutov CLA 2020-12-08 14:49:36 EST
Please attach what "About - Configuration Details" says.
Comment 2 Kent Dorfman CLA 2020-12-08 15:42:03 EST
this doesn't work either:

XAPPLRESDIR=/etc/X11/app-defaults RESOURCE_NAME=Eclipse /usr/local/eclipse/eclipse

where the Eclpse resource file contains:
*Xft.dpi: 48

Other Xfreetype apps work as expected.  It's eclipse that is the PITA
Comment 3 Kent Dorfman CLA 2020-12-08 15:47:03 EST
OK -- monetarilly...
Comment 4 Kent Dorfman CLA 2020-12-08 15:47:31 EST
(In reply to Andrey Loskutov from comment #1)
> Please attach what "About - Configuration Details" says.

ok - in a few minutes
Comment 5 Kent Dorfman CLA 2020-12-08 15:53:26 EST
Created attachment 284996 [details]
aout-config

per request
Comment 6 Andrey Loskutov CLA 2020-12-08 17:10:48 EST
Could you just for fun check if may be 4.18 RC2 works better?

For the record, here is what we get from the system:

org.eclipse.swt.internal.deviceZoom=100
org.eclipse.swt.internal.gdk.backend=x11
org.eclipse.swt.internal.gtk.theme=darkgtk3
org.eclipse.swt.internal.gtk.version=3.24.5
GDK_DPI_SCALE=1
GDK_SCALE=1
Comment 7 Kent Dorfman CLA 2020-12-10 14:01:42 EST
The GDK symbols certainly affect the UI font sizes, but in a global manner, so very hackish to go that route in addressing the bug.

The issue seems purely that the UI is not referencing the defined xresouce properly when it is contained within the C preprocessor blocks in the xrdb database.

I don't have the internet resources to be downloading full eclipse installations on a trial and error basis.  Due to its size and setup complexity for my use case I only download one release per year...unless I know of a critical feature patch that requires a complee download...so I'm more hesitance to install RC2 unless you know for certain that it fixes the issue.
Comment 8 Andrey Loskutov CLA 2020-12-10 14:10:17 EST
No, I don't *know for sure*, just guessing you might have luck with 4.18 because why not :)

I fear your configuration is a very special one, so except you are willing to debug it yourself nothing will change.