You are not logged in.

#1 2020-05-26 15:30:39

Shalrath
Member
Registered: 2020-05-26
Posts: 6

Change wallpaper without blocking inputs from games?

Hi,

I know this is a very special problem / question, but maybe someone can at least give me a hint on how to investigate the issue further or if there is a solution at all or even what could be the cause of it...

While changing my desktop wallpaper (scripted in background), inputs (mouse movements and key presses and key releases) get stuck in games during the runtime of the tool that sets the wallpaper. The game itself does not stop/pause, only my control inputs. Control comes back after the wallpaper setting tool returned, usually around one second.

I wrote a script that takes a screenshot from the weather forecast, integrates it into my wallpaper and then sets the new wallpaper every few minutes.
After some debugging, i found that actually setting the wallpaper causes the input problem in games, not loading the website, taking the screenshot or anything else my script does.

I tried the following tools to set the wallpaper, both cause the problem:
- feh
- hsetbg

I encountered the inputs getting stuck in the following games:
- Metro Last Light
- gzdoom
- darkplaces (Quake 1)
- Doom 2016 (Steam / Proton)

Minimal example to reproduce:
1. Run a terminal, start this and keep it running in background
$ while true ; do feh --bg-fill --no-fehbg MY_IMAGE.jpg ; sleep 1 ; done
2. Play a game (e.g. gzdoom).
Mouse and keyboard are lagging for a short time every second.

I really don't have an Idea what causes this, I don't have the problem during desktop usage as there I can always move the mouse smoothly and type without interruptions caused by the wallpaper change. It only happens in games, but in all of the ones I tried so far.

Any ideas or suggestions would be appreciated.
Of course, I could just stop my weather widget while playing games, but maybe there is a better solution.
Is there a way to start a program on X but disallowing it from "grabbing" any inputs?

Thank you and BR,
Stephan

Offline

Board footer

Powered by FluxBB