You are not logged in.

#1 2017-09-24 08:35:22

osoerk
Member
Registered: 2017-09-24
Posts: 1

[SOLVED] gtk+ doesn't respect dpi information from second xscreen.

Setup : nvidia proprietary driver, fvwm

I have FHD and UHD monitors, so I need two different DPI settings per display.

I first tested xrandr scale option, but it makes the fonts too blurry to read, so it's no-go.

Nexi I've tested two seperate xscreens setting(without xinerama or xrandr) and it was a better solution for me.

My terminal(urxvt) or qt5 apps are using automatically smaller font size on FHD and bigger font size on UHD, except for gtk+ apps...



It seems gtk+ apps are using the dpi or display informations from the first monitor only, so they show too small fonts on the UHD monitor.

Are there solutions to set dpi information per display for gtk+ apps?








---------------------------------------------------------------------------------------------------

Ok, I probably found why it can't be.

This patch seems to make the dpi of gtk3 can only be set by the global xft.dpi setting, and if there is none, it is not automatically calculated, but set 96 by default.

So, monitor dpi cannot automatically be calculated and applied to gtk3 apps.


-----------------------------------------------solution--------------------------------------------------
sorry for multiple self-reply, but I have solved this issue. It is perhaps for fvwm only.

($DISPLAY value of FHD is :0.0 and UHD :0.1)
I have changed my ~/.xinitrc from

...
exec fvwm

to

...
exec fvwm -s -d :0.0 &
exec env GDK_DPI_SCALE=1.8 fvwm -s -d :0.1

and every gtk3 app I installed(chromium and emacs) works ok now.

Last edited by osoerk (2017-09-25 12:10:27)

Offline

Board footer

Powered by FluxBB