Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: Corollax on June 11, 2011, 01:22:46 am

Title: Alt+Tab in Windowed Mode? [SOLVED]
Post by: Corollax on June 11, 2011, 01:22:46 am
Is there any way to switch tasks while Freespace is running? I occasionally have to attend to other things while I'm gaming, and I haven't been able to figure out how to accomplish this, either on the wiki or the forums.

If I've overlooked something obvious, I apologize, but if this isn't currently possible then I at least know to stop looking.

EDIT: Needed the "-nograb" flag. I can't believe I missed that!
Title: Re: Alt+Tab in Windowed Mode?
Post by: Halleck on June 11, 2011, 01:47:59 am
I've had similar issues. Try this... in the launcher, set the video resolution to use the same resolution as your desktop Then go into the Features tab, choose "Dev Tool" from the list types, and check "Run in fullscreen window." This is a bit funky but it seems to allow for alt-tabbing out of fullscreen.

Caveat, this works on Windows, I haven't tried anything similar on Mac OS or Linux. But on those systems you could try this with an alternate launcher, or try using regular windowed mode at your desktop resolution.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Corollax on June 11, 2011, 01:55:09 am
A couple things...

1.) The launcher doesn't work in Linux. I'm launching the program from a script.
2.) I want it to run in Windowed mode, not full screen.
3.) Alt-tab doesn't work at all, whether in full screen or windowed mode.
4.) My mouse is restricted to the Freespace Open window.

So unfortunately, none of that helps  :sigh:
Title: Re: Alt+Tab in Windowed Mode?
Post by: Halleck on June 11, 2011, 03:22:40 am
Hm... I've never run FS2 on linux so I'm not sure how the mouse-grab works. Have you tried pausing the game by pressing the Esc key (or Pause key if you have one?) That releases the mouse grab under Windows and you can click out. Your mileage may vary...

EDIT: Also, you might be able to use wxLauncher to test out the settings I mentioned earlier: http://code.google.com/p/wxlauncher/
Title: Re: Alt+Tab in Windowed Mode?
Post by: chief1983 on June 11, 2011, 11:58:17 am
Yal works on Linux too.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Corollax on June 11, 2011, 03:58:09 pm
Hm... I've never run FS2 on linux so I'm not sure how the mouse-grab works. Have you tried pausing the game by pressing the Esc key (or Pause key if you have one?) That releases the mouse grab under Windows and you can click out. Your mileage may vary...

EDIT: Also, you might be able to use wxLauncher to test out the settings I mentioned earlier: http://code.google.com/p/wxlauncher/

Yes, I have tried both. Neither one releases the mouse cursor.

The launcher really has nothing to do with this. I can feed the same command line flags to the game it does, and as I said earlier, I do not want to run the game in full screen. I want it in windowed mode -- I just want to be able to alt-tab out.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Dragon on June 11, 2011, 04:08:30 pm
For me, hitting the "Windows" key always caused a break to desktop (in any game), though if you're running Linux, I'm not sure if it'll work.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Corollax on June 11, 2011, 04:27:57 pm
It does not, nor does the "Windows+D" combination work properly (it should minimize all active applications).
Title: Re: Alt+Tab in Windowed Mode?
Post by: The E on June 11, 2011, 05:50:23 pm
That's because FSO ignores the "Minimize" message on Windows.

However, this thread is about FSO on _Linux_, which is a different environment, with different rules. Windows-specific talk goes elsewhere.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Iss Mneur on June 11, 2011, 11:37:48 pm
FSO ignores the window manager on SCP_UNIX systems (linux, OSX, etc), which means that you can't "alt-tab" out.

It is possible to pass -window to the engine and have it not go full screen. Using -nograb when in windowed mode should prevent FSO from permanently stealing the mouse/keyboard.

It is on my todo list to correct platform differences like this, so that FSO behaves as close as possible to the same on all supported platforms.
Title: Re: Alt+Tab in Windowed Mode?
Post by: Corollax on June 12, 2011, 08:52:11 pm
FSO ignores the window manager on SCP_UNIX systems (linux, OSX, etc), which means that you can't "alt-tab" out.

It is possible to pass -window to the engine and have it not go full screen. Using -nograb when in windowed mode should prevent FSO from permanently stealing the mouse/keyboard.

It is on my todo list to correct platform differences like this, so that FSO behaves as close as possible to the same on all supported platforms.

You are my hero; that is EXACTLY what I needed. Thank you so much! <3 <3 <3

Good luck with your fixes, and thank you again for making my day ^^
Title: Re: Alt+Tab in Windowed Mode? [SOLVED]
Post by: jr2 on June 13, 2011, 05:52:56 am
FYI, I notice that a lot (well, the ubuntu and Mint installs that I've used) of Linux installs don't assign the Windows key... you have to go to the keyboard config and tell it to use the key... otherwise, it's ignored and not usable.  Or maybe it's just me.  :nervous:
Title: Re: Alt+Tab in Windowed Mode? [SOLVED]
Post by: Corollax on June 13, 2011, 06:45:23 am
FYI, I notice that a lot (well, the ubuntu and Mint installs that I've used) of Linux installs don't assign the Windows key... you have to go to the keyboard config and tell it to use the key... otherwise, it's ignored and not usable.  Or maybe it's just me.  :nervous:

Well, technically, it's a meta-key just like control or alt, or shift. I personally use it to click and drag windows when the title bar isn't accessible (normally, this is mapped to alt+click, but I use that for other applications).
Title: Re: Alt+Tab in Windowed Mode? [SOLVED]
Post by: jr2 on June 13, 2011, 01:21:41 pm
Ya, but by default it's set to 'ignore' IIRC.
Title: Re: Alt+Tab in Windowed Mode? [SOLVED]
Post by: The E on June 13, 2011, 01:25:56 pm
Not on any Ubuntu release for a very long time. The win key is usually mapped to "Super". (At least it has been that way as far as I can remember back, which would be like back in the Ubuntu 7.04 days)