furnace
furnace copied to clipboard
Wayland & HiDPI / scaling
This problem is being worked around in the code by defaulting to X11 if no specific video driver was requested (which is broken for Haiku, see #590), but it's not fixed. This problem was originally filed and worked around under #153, but no follow-up was opened to properly track fixing of this problem. So here we are. :duck:
XWayland w/ scaling: All good.
$ env SDL_VIDEODRIVER=x11 /path/to/furnace

Native Wayland w/ scaling: Not all good.
$ env SDL_VIDEODRIVER=wayland /path/to/furnace

Native Wayland w/o scaling: Looks correct but too small to be usable.
$ wlr-randr --output DSI-1 --scale 1.0
$ env SDL_VIDEODRIVER=wayland /path/to/furnace

$ neofetch --off
OS: postmarketOS v21.06.4 aarch64
Host: Pine64 PinePhone (1.2)
[...]
Resolution: 720x1440
DE: GNOME 40.1
WM: weston
$ wlr-randr
DSI-1 "<Unknown> <Unknown> (DSI-1)"
Physical size: 68x136 mm
Enabled: yes
Modes:
720x1440 px, 60.006001 Hz (preferred, current)
Position: 0,0
Transform: 270
Scale: 1.750000
Wayland scaling can be adjusted with
$ wlr-randr --output DSI-1 --scale 2.0
Phosh starts with a scaling of 2.0, I prefer 1.75 for personal use.
So it appears that SDL Wayland is going the macOS way regarding HiDPI scaling - pixel sizes are logical... This won't be easy to fix.
Progress Report: (scaling branch)
- Wayland HiDPI works
- ~~input positions are still wrong~~ new commit fixes this

Please test with git scaling:
- Make sure scaling factor is auto-detected properly
- Try resizing Furnace
- Make sure the Choose a System window (new) and the built-in file picker is centered
- Make sure input doesn't go weird after resizing
Posting here since reporter is unable to reply.
Resize: partially working
- Modals stay centered correctly
- Input not tested
Rotate (on rotation-capable device): not working
- Furnace displays at the wrong size, even on startup
scaling branch merged.
On 0.6pre3 (didn't test master yet), scaling goes wack on Miriway compositor and Lomiri DE.
-
Launch windowed

-
Make maximised

-
Close so maximised setting is saved
-
Launch maximised

-
Make windowed again

Additionally furnace doesn't respond to the mouse (hovering, clicking, scrolling) in windowed mode, seems to work fine when maximised however.
Finally testing Wayland again.
On master, with kwin_wayland on X11:
~~Help! I cannot close the window after maximizing it!~~
Furnace fails to remember its maximized status. It also fails to remember its size after going full-screen.
However Furnace does respond to mouse input on Weston and kwin_wayland. Oh no Mir bug? :<
Yeah OK I see a problem. Pushed a change which makes Furnace remember its windowed size after being full-screen. Apparently yes, Furnace does change the scaling factor to an inappropriate value when started in full-screen. I can conclude that at least the faulty scaling factor detection is not a Miriway bug.
Pushed a fix. It shouldn't change the scaling factor anymore.
Analysis complete - it appears there is a bug in Mir and/or SDL. Once we update to 2.28, the issue will be closed.
For reference, observations under Mir seem similar to upstream issue: https://github.com/MirServer/mir/issues/2841
SDL 2.28 is out. Will try to upgrade.
Build successful. Closing.