Page 1 of 1

Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Posted: Thu Nov 02, 2023 5:36 pm
by sparr
I was using the modding toolkit debugger with a breakpoint that triggered when I clicked on something in-game. This left my mouse clicks captured by factorio, so I couldn't click on anything anywhere else while other mouse and keyboard functionality worked fine.

https://unix.stackexchange.com/a/62252/2434 led me to `xdotool key "XF86LogGrabInfo"` which puts a list of active and registered input grabs into `Xorg.0.log`, where I found factorio with the sole grab and a mask for clicks.

https://unix.stackexchange.com/a/40472/2434 led me to `setxkbmap -option grab:break_actions; xdotool key XF86Ungrab` to release the grab!

Re: Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Posted: Tue Nov 07, 2023 6:22 pm
by raiguard
Version 1.1.95 features a new hidden setting disable-mouse-auto-capture that will prevent this issue.

Re: Workaround for broken mouse click functionality when debugging Factorio in a mouse event

Posted: Fri Dec 08, 2023 6:16 am
by justarandomgeek
If anyone has any suggestions for how I can detect, from the debugger (in TS), that this has occurred (or is likely to occur in a given environment), i can also offer to set the setting for the future.