brndnmtthws / conky

Light-weight system monitor for X, Wayland (sort of), and other things, too
https://conky.cc
GNU General Public License v3.0
7.18k stars 616 forks source link

[Bug]: set_struts wrong with large DPI #1961

Open Caellian opened 3 months ago

Caellian commented 3 months ago

Reported by @zygfryd

Desktop reserved space (in panel mode) seems to be double the actual window size.

When Xft.dpi: 192 (2x default).

After testing with test/workaread-adjustments which applies DPI left and applies inverse on the right margin,

Left alignment results in 3x reserved space (tested by maximizing a window), right alignment results in no reserved space.

Not sure whether right alignment can be fully trusted in the test because it could be affected my left alignment. It looks like window.geometry stores premultiplied values, and X11 expects logical position.

Related function: x11.cc/set_struts

Broken by #1910, #1862, or #1849.

zygfryd commented 3 months ago

I just realized that right alignment wouldn't have worked because of having multiple monitors and testing on the left monitor. I edited inverse scaling on the left side, and that worked correctly.

Caellian commented 3 months ago

PR #1963 reversed set_struts code. This issue might still persist, just linking it here for context. I'll work on it some time this week.