this post was submitted on 27 Mar 2024
28 points (96.7% liked)

Linux Gaming

14748 readers
408 users here now

Discussions and news about gaming on the GNU/Linux family of operating systems (including the Steam Deck). Potentially a $HOME away from home for disgruntled /r/linux_gaming denizens of the redditarian demesne.

This page can be subscribed to via RSS.

Original /r/linux_gaming pengwing by uoou.

Resources

WWW:

Discord:

IRC:

Matrix:

Telegram:

founded 1 year ago
MODERATORS
 

I'm new to having Linux on my main rig. It's been about a month now. I'm hoping someone has a better way to handle focus while gaming.

I used to, on Windows 10, hit the Windows key to then fiddle with my panel and other opened programs (or alt+tab). In Linux Mint, I have the issue that the Super key doesn't focus the panel and menu, only the menu. I know the reasons for this but functionally It is what I wish it did.

On top of that, alt + tab yanks the cursor to the center of the game screen after initially swapping to the other program. Pushing the super key alone does this as well. But ctrl+alt+down does allow me to swap focus, but it isn't as quick to do.

I'm new so I'm thinking maybe there is a better way to quickly swap focus or even better to kill it from centering the mouse on the game occasionally when swapping around.

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 12 points 4 months ago

I do it using both of the ways you described, without either of the problems you described. KDE Plasma 5 on X11.

[–] [email protected] 4 points 4 months ago

Not sure if this would help, but I've found it nice separating my open programs between workspaces. Game on one and other programs in side tabs. Can quickly access the panel by switching workspaces.

Does take a bit of self-adjusting to how it works on Windows as you need to organize in your mind which program is in which workspace.

[–] [email protected] 3 points 4 months ago

From my experience at least, some games are just like this, more often than not when using proton. I don't really have this issue that often after switching to i3wm. Can you switch to a different workspace? Is your game in fullscreen? It usually works better for me in windowed borderless. The benefit of using i3 is that you can run games in standard windowed mode, and let i3 fullscreen the application, or just switch workspace entirely. Hopefully this helps.

[–] [email protected] 2 points 4 months ago

i usually have one window open in the background and alt+tab into that, or if not, i hit windows key and it lets me type in the menu and i can launch another program from there. alternatively you can press win+d and it'll throw the game out of sight. wondering if alt+esc would defocus the game, am not near my pc so i can't test that yet. or how about swapping desktops? (ctrl+alt+right/left)

[–] [email protected] 2 points 4 months ago

Try going into a menu first.

[–] [email protected] 1 points 4 months ago

No idea where is that in Linux Mint (Cinnamon) but you probably have a "focus follows cursor" setting somewhere. If you manage to disable it, you will only switch focus by clicking.

Personally I use bspwm and instead of switching between windows, I switch between workspaces. I also have focus follows cursor setting enabled and it's essential for my workflow, however it can be disabled.

[–] [email protected] 1 points 4 months ago (1 children)

centering the mouse on the game

Maybe I'm missing something, but.. why is this a problem? You can just like, move the mouse to where you want it?

I can't replicate this issue on mine. I recently somehow broke Gnome (again) during an update, so I finally went back to a tiling WM (awesome this time). I start the game in a separate desktop, and then when I need to do things outside of the game, I just change to another desktop using the keyboard shortcuts. Pretty sure this is possible in all WM/DEs on Linux.

[–] [email protected] 3 points 4 months ago

When it centers it there it often is delayed. So I will drag my mouse to my second window, usually Firefox, and it will suddenly jump centered to the game.

[–] [email protected] 1 points 4 months ago

You can't have screen scaling on and not run in the native resolution for the game window. Might be your issue.

[–] [email protected] 1 points 4 months ago

I do not experience the behaviour with the cursor, but when a game in fullscreen doesn't play nice, I move it to the second workspace (with a keybind) and then quickly switch to the first workspace with another keybind. Both are easy to remember and as fast as alt + tab.

[–] [email protected] 1 points 4 months ago

If you can't fix it you could try running the game inside Gamescope, it can help with weird alt+tab issues.