Skip to content

window_sdl: Fix SDL2 dropped file paths on Wayland

On X11, the paths are correct by default.
However using Sway, they are prefixed with file:// and terminated with a carriage return.

I had to manually prioritize SDL2 for windowing over GLFW, as GLFW does not support drag and drops in Wayland.
Also, for some reason my X11 environment cannot initialize GLFW at all.

Not tested on other systems but I assume nothing breaks.
There's probably a cleaner way to do this, though. There's no verification on whether or not \r is present.

Edited by quietvoid

Merge request reports