Reply to topic

Incompatibility between global hotkeys and fullscreen apps?

Lyle
Registered Member
Posts
8
Karma
0
Hi. I apologize if this is in the wrong section. Please move it if needed.

Anyways, I've known for a long time that certain fullscreen applications block the use of global keyboard shortcuts (alt-tab, desktop switching, media playback controls, etc...). I've always found this behavior to be very agravating since it requires me to kill the application to do something as simple as switch to my open web browser or adjust my system volume. However, I never made a big deal out of it because it was rare for me to encounter such applications.

Now Steam is on Linux and there are tons of video games coming out for Linux. I've been taking advantage of this opportunity to do some gaming, but I've found that many/most of them will block keyboard shortcuts like I described when running in fullscreen mode. Now that this problem is starting to become a daily annoyance for me (and some other Linux gamers I know).

After extensive Googling, I found some old forum posts that indicate there is a workaround by adding a Option "AllowDeactivateGrabs" "True" to your xorg.conf and using ctrl-alt-keypad_divide to release the mouse and keyboard grabs. However, more recent forum posts indicate that this feature was removed altogether (because removing features is always a good idea, right?). Even if this option was still around, it's most definitely not an ideal solution in my opinion. Right now, the workaround I am using is to run games in windowed mode with no window decorations/border and the plasma panel in "windows can cover" mode. This is also not even close to being ideal, especially since many games have very poor resolution options to choose from and I often cannot even get windowed mode games to take up the whole screen.

Does KDE/Kwin provide any utilities for preventing windows from taking control of my global shortcuts? If not, is there any plans for adding this functionality? Would a feature request for this be taken seriously? is it even feasible?
luebking
Karma
0
Those clients grab the keybord (and usually mouse) and become the exclusive receivers of input events. No more input to the shortcut system. It doesn't "see" the keyboard anymore.

a) there's no protection against this.
b) releasing the grab (on the X11 layer, the shortcut you found. You must enable the feature) might have unwanted outcome (game doesn't work anymore) - also it's considered a "security" risk, mainly because screensavers/lockers use this mechanism to prevent access to the desktop (you don't want alt+tab to work there, do you ;-)
c) This will not change with X11. Never. No work is done on that. Grabbing has been a conceptual issue for the past 30 years (bit like cooperative multithreading on MacOs prior to OSX). The client ("game") should just not grab the input device but for very strong reasons.
d) Input on wayland works much different, so that eg. global shortcuts are protectable against "global" grabs.
(Not sure about XWayland though, ie. when an nested X11 client attempts to grab input on wayland)

FYI, this has nothing to do with "fullscreen" apps - eg. popup menus grab pointer and keyboard and even a pushbutton does so when you press it (until you release it)
Lyle
Registered Member
Posts
8
Karma
0
Thank you for the fast response.

I have found out that for games using the Steam client I can shift-tab to access the Steam dashboard where I can then use my global hotkeys again. This only works for games running in Steam.

So, would my best bet be to send a polite message to the developers explaining my situation and requesting a fix?
luebking
Karma
0
If the games provide windowed modes and work fine in them WITHOUT grabbing input, they merely grab input to "fake" a fullscreen window (the fullscreen game is probably not even a managed window - this might be an implicit condition, originally caused by the SDL toolkit, which is prone to this)

If you can get the windowed game to run in fullscreen resolution (ie. you can select 1920x1080 or whatever is your native resolution), you can set it fullscreen on the system level:
Press Alt+F3 and under "More actions" select "Fullscreen"
The window will now be a *real* fullscreen window. KWin will put it above any docks and all other windows.

This can even be automized:
Choose "Special window settings" (from the Alt+F3 menu) and in the "Size & Position" tab, check "Fullscreen", set it to "Force" or "Apply initially", ensure "Yes" is ticked.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], gohmifune, Google [Bot], mparillo, tia3100