vioken / waylib

A wrapper for wlroots based on Qt
46 stars 23 forks source link

Xwayland and Wayland synchronized scaling #374

Closed lbwtw closed 3 months ago

lbwtw commented 3 months ago

control wl_client xdgoutput logical_size,Right now only protocols used by Xwayland are covered.

lbwtw commented 3 months ago

After applying these two patches, the remaining problems are: 1, output scale 2x, use the following command

DISPLAY=:1 qtcreator -platform xcb
DISPLAY=:1 QT_SCALE_FACTOR=2 qtcreator -platform xcb

when resizeing X11 windows, there is an occasional window flickering phenomenon

2, qt X11 applications will not follow dpi scaling in real time (no need to restart the application), refer to the following bug tracker:https://bugreports.qt.io/browse/QTBUG-126164

3, gtk applications currently do not know how to follow dpi scaling in real time (no need to restart the application)

test cmd: qt use xrdb:

xrdb -merge <<< 'Xft.dpi: 192'  // scale 2x, 192 / 96 = 2

gtk use xsettingsd:

// change xsettingsd.conf
# ~/.config/xsettingsd/xsettingsd.conf
Gdk/UnscaledDPI 196608    // 196608 / 1024 / 96 = 2,mean scale 2x
Gdk/WindowScalingFactor 2

// then start this command 
xsettingsd

Note: that under the current situation, running these commands requires restarting the application to take effect