Page 1 of 1

[1.1.72]on Linux, held item preview disappears on keyboard input, reappears on mouse input

Posted: Sat Nov 26, 2022 4:11 am
by marienz
This is a little hard to explain (I've attached a video that might help).

I'm only seeing this on Linux (Fedora 37, Sway 1.7, wlroots 0.15.1). Factorio in Windows on the same system works correctly.

If I select a building from the inventory, the held item preview (showing where the building will be placed and which way it will face) appears when I move the mouse, but disappears every time I press a key on the keyboard (releasing a key is ok). When I don't see the preview, the mouse cursor is replaced by the building icon and the information panel below the map (sorry, don't know what this is called) disappears. When I do see the preview, the mouse cursor is the normal arrow and the panel reappears.

This seems like a bug because it makes placing buildings annoying, particularly rotating them: I have to wiggle the mouse after pressing `R` to confirm I rotated it correctly.

Re: [1.1.72]on Linux, held item preview disappears on keyboard input, reappears on mouse input

Posted: Sat Nov 26, 2022 11:06 am
by jodokus31
At first, I don't have this problem playing on Linux. But I'm playing an XFCE with regular XServer.

Sway and wlroots are working on Wayland. I also tried factorio on Gnome with Wayland and didn't have this issue.
But, maybe something with sway or or wlroots is fishy...

Do you have a chance to try a different DE or compositor?

Also, the log file might help, i'd guess.

Re: [1.1.72]on Linux, held item preview disappears on keyboard input, reappears on mouse input

Posted: Thu Nov 28, 2024 12:54 pm
by marienz
Coming back to Factorio for 2.0 + expansion... it's still there, and it's (embarrassingly obvious in hindsight) user error.

It's triggered by

Code: Select all

seat * hide_cursor when-typing enable
in my Sway config. Which normally hides the mouse cursor image on keypress, but apparently behaves a little differently in-game. After disabling that, all is well.

(The setting even comes with a helpful warning that it "can interfere with input handling in games" in Sway's documentation... really should've noticed I had that set. Sorry!)