What I mean by a smaller resolution is that the field the cursor is constrained to is smaller than the actual game resolution.
This happens no matter how I launch it. When I launch it with prime-run it shows up in nvidia-smi, but still has the bug, and it’s the same without prime-run/nvidia-smi. Additionally, Lutris and Steam-only launches don’t change much. Here’s part of the log from Lutris while it was running Terraria:
Using EXT_swap_control_tear VSync!
Resolution changed to: 1920x1080.
Using EXT_swap_control_tear VSync!
Using EXT_swap_control_tear VSync!
Resolution changed to: 1912x1016.
There’s more stuff in the log, but I’m not sure what to look at, it seems mostly Steam itself logging.
The resolution also changes in the internal game settings sometimes, so I can temporarily fix it by exiting fullscreen mode (in-game) or changing the resolution manually, however it’s cumbersome/impossible to access settings while playing due to this bug.
I was tinkering with seperate Activities, but it turns out the game is in the background and clickable for all activities. It works if you switch away by pressing Meta + Tab, then click on the Activity in your Panel widget to return to the game, but clickable.
I might’ve found the solution, so if anyone else is looking for it or wants to tell me that I probably did something wrong, then I’ll add it here.
I used “Window Management > Window Rules” to create a setting with these entries:
Window class (application), exact match, terraria.bin.x86_64 terraria.bin.x86_64 (or whatever your terraria window is, use “detect window properties” on a windowed Terraria)
Match whole window class: yes
Minimum size, force, 1920x1080 (initial issue)
Maximum size, force, 1920x1080 (secondary issue, popped up after first fix)
It flickers when you re-enter, but that’s the best I could get.