Frictional Games Forum (read-only)
ALT+TAB - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-57.html)
+--- Forum: Technical Support - Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-31.html)
+---- Forum: Linux - ATDD (https://www.frictionalgames.com/forum/forum-32.html)
+---- Thread: ALT+TAB (/thread-3912.html)

Pages: 1 2


ALT+TAB - Caterpillar - 09-08-2010

Does exist a shortcut to open the main window of the operating system for a while?
Like ALT+TAB in Windows


RE: ALT+TAB - weltall - 09-08-2010

(09-08-2010, 12:25 PM)Caterpillar Wrote: Does exist a shortcut to open the main window of the operating system for a while?
Like ALT+TAB in Windows

run it in windowed mode with the resolution of your monitor and use your window manager full screen or no border mode


RE: ALT+TAB - Urkle - 09-09-2010

not at this point no. Alt-tab is tricky with SDL applications unfortunately. If you run in windowed mode, however,when you "escape" to the menu the mouse is released so you can freely switch to other applications. AND the game goes into "suspend" mode and releases CPU cycles to other applications as well when it no longer has focus.


RE: ALT+TAB - Lasse. - 09-09-2010

One way is to launch separate X Server for the game. This way you can change between the X server running your desktop and the one running the game easily. This can be achieved with a short script.

Guide (I use CLI-way to make it universal, no matter which desktop environment user might use and so):

First, let's make the script-file
Open up the terminal then run
Code:
nano amne
You may change amne to something else, that's our script-file's name. Also make sure your terminal's current directory is your home, if not, then
Code:
cd ~
to move there.

Then copy the following to your script-file, opened in nano
Quote:#!/bin/bash

DISPLAY=:1.0

xinit /opt/AmnesiaDemo/Amnesia.bin64 $* -- :1
You need to adjust "/opt/AmnesiaDemo/Amnesia.bin64"-part depending on where the game is installed and if you're using 32 or 64 bit version, basically just point it to your Amnesia-binary. Save the file with ctrl+x
NOTE: Using amnesia's launch-command directly DIDN'T work for me, It launched the launcher in new X Server and I couldn't use mouse there, this way it worked all good for me.

Next, let's allow the file to be run, if this is not done, you will get "permission denied" if you try to run the file.
Code:
chmod +x amne

All is set! Now you can run it via your desktop environment or via terminal
Code:
./amne
You change between the X servers with ctrl+alt+fx
x being like f7. Default X server where your desktop runs, should be F7 and new X server should be F8.
So if you want to get back to your desktop while playing, just pause the game with esc and press ctrl+alt+f7 and when you want to get back to your game, press ctrl+alt+f8.

EDIT: Also, after you quit the game, you might need to go manually back to your desktop X server with ctrl+alt+f7.

Hope this helps!


RE: ALT+TAB - Caterpillar - 09-09-2010

As soon as possible I will try, thank you


RE: ALT+TAB - jspenguin - 09-10-2010

(09-09-2010, 09:52 PM)Caterpillar Wrote: As soon as possible I will try, thank you

You can also try this wrapper that I wrote specifically for SDL games like this. It allows you to press Ctrl-Shift-Z to minimize the game. Unfortunately, with Penumbra and Amnesia, the mouse still seems to be locked after minimizing (maybe they don't use SDL for mouse input?). Most other games work fine.


RE: ALT+TAB - Urkle - 09-11-2010

We are using sdl for mouse input. The issue is most likely because we are grabbing the input via SDL.


RE: ALT+TAB - jspenguin - 09-12-2010

I've fixed the wrapper so that the mouse is restored properly when the game uses SDL_WM_GrabInput. Some SDL games don't use it because it's not really necessary in fullscreen mode.


RE: ALT+TAB - ced117 - 09-12-2010

Nice wrapper, thank you jspenguin Smile


RE: ALT+TAB - buba - 09-21-2010

jspenguin, work great! I created PKGBUILD for Arch if you don't mind.