phil294 / AHK_X11

AutoHotkey for Linux (X11-based systems)
GNU General Public License v2.0
815 stars 15 forks source link

Is it possible to prevent taskbar popping up when pressing hotkey in fullscreen game? #59

Closed Shringe closed 11 months ago

Shringe commented 1 year ago

I have a AHK script to bind my mouse sidebuttons to keys for a game, and whenever they are pressed the taskbar pops up over the game, until I re-fullscreen the game. Im not sure if this is a bug, or limitation with KWin(also happens with compositor off), this project, or X11. Does anyone know what causes this, and if there is a fix?

phil294 commented 1 year ago

hi! what distribution are you using exactly?

what do you mean by taskbar - the application launcher only, or the entire bar? And once the bar receives focus, shouldn't that even cancel the fullscreen of the game?

Also, does this happen with all hotkeys or just certain ones?

Anyway, please try adding #XGrabRoot anywhere in your script, perhaps this fixes it.

Shringe commented 1 year ago

By taskbar I mean the entire 'panel' in Plasma. It for some reason does not minimize the game, most likely was in windowed borderless not fullscreen I assume. The hotkeys that were tested were XButton1, XButton2, and MButton. #XGrabRoot for some reason fixes it, although it does not ask for password or root permission in any way. Edit: Using Arch Linux with KDE Plasma version 5.27.8

phil294 commented 1 year ago

Ok. The root xgrabroot doesn't refer to root user but x11 "root window", so this is expected. I haven't quite figured out why this directive is necessary though.

phil294 commented 1 year ago

ok arch + KDE, so probably the problem of #51 applies to all KDE installations, not just Solus Linux. In my tests, that wasn't the case though. Needs more investigation. For you it should not matter, just keep using the directive.