diff options
author | Ivan Oleynikov <ivan.oleynikov95@gmail.com> | 2021-07-27 00:19:42 +0600 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2021-07-29 17:01:31 +0000 |
commit | 3c1d27d8859cc4eda5802c1502ee5ae7430a9c8f (patch) | |
tree | 42b5f3a59b327bcf60ae6e1881fb2ec3923f6ed5 /subprojects | |
parent | eeaf5e3cb983befd20bc5d706f5b8e7cd321decf (diff) | |
download | imv-3c1d27d8859cc4eda5802c1502ee5ae7430a9c8f.tar.gz |
Scale fonts when Wayland updates scaling factor
Before this commit, the code in src/wl_window.c seemed to handle the Wayland
scaling [1] correctly, it was sending resize events to imv to update the buffer
size accordingly. One thing it didn't update is the scaling of fonts that Pango
renders on Cairo.
This commit simply forwards the scaling factor (computed as [1] requests)
together with updated buffer dimentions in resize event, and when the resize
event is handled it calls cairo_surface_set_device_scale to notify Pango/Cairo
of the scaling.
For X11, I simply assume the scaline factor is always 1. This seems to be what
the old code did: `grep scale src/x11_window.c` gives no matches. AFAIK, X11
does not have an established way of telling clients what scaling factor to use
(and never updates it at runtime).
[1]: https://wayland-book.com/surfaces-in-depth/hidpi.html
Diffstat (limited to 'subprojects')
0 files changed, 0 insertions, 0 deletions