- Home /
How to prevent a fullscreen application from minimizing
I'm running my standalone fullscreen application across multiple monitors on a stretched desktop. As soon as the user moves the mouse offscreen and clicks, my application minimizes to the taskbar (Is that even supposed to happen? Offscreen clicks even though it's maximized across all monitors?).
Is there any way to prevent the application from minimizing, no matter where I click?
-Sebas
Answer by qJake · May 15, 2010 at 09:29 AM
Unity does not support multiple monitors by itself, as it stands right now. When a DirectX/OpenGL fullscreen application loses focus, Windows is designed to "minimize" the game, and Unity will typically "pause" the game (i.e. not update anything) when it loses focus. You're losing focus because DirectX/OpenGL applications typically only tie into the primary display adapter, ignoring any secondary ones. Unity isn't the only game/game engine that behaves like this, either, in fact the vast majority of PC games also behave this way. Unfortunately, there's really nothing you can do about this, short of writing some extension code for Unity by tapping into its low-level API's (if you have Unity Pro), though if you were even to do that, I'm not sure you could code in support for multiple monitors at that point, either.
Short answer: No. This is a fundamental "by-design" issue with Windows, and full-screen graphics applications. You might be out of luck unfortunately.
Although this is marked 'best answer', I think the answer bij AsifHasan is better and comes with a fix (enable 'Visible in Background').
Answer by AsifHasan · Jun 13, 2015 at 09:36 AM
Enable "Visible in background" under Build settings/Standalone
this is actually a property in "player settings>quality".
But it works perfectly.
Thank you.
It is now under Project Settings -> Player -> Resolution and Presentation
(at least in 5.4.2f2).
Also in this place I recommend enabling "Run in background"
Better fix than the one marked with 'best answer'. Thanks!
Answer by lowbloodsugar · May 20, 2010 at 12:06 AM
This is actually a pretty serious issue for us too. It basically makes running support applications impossible.
IS there an update to this or similar issue? I am only running on one maonitor, kiosk mode for customer (lobby application). burning in computer (Win 8) over several days, at random time the unity self running demo I created (.exe) just $$anonymous$$imizes to taskbar, no windows message of any sort (I shut down everything, no virus checker, no screensaver, power options full on, etc.) this could give us a black eye by our customer.
I am also using Unity for an kiosk application running as an interactive installation piece in a gallery of sorts. The Unity application starts with Windows 7 in full-screen mode and works for a while, but after a few $$anonymous$$utes, it suddenly becomes $$anonymous$$imised in the taskbar, even when no new windows or dialog boxes are popping up. This is very troubling behavior and renders my application useless in the context of the project.
Answer by ThaBukkow · Mar 20, 2015 at 11:26 AM
It might be a bit late, but I use this for Kiosk mode applications.
You can start the game with this batch script:
@ECHO OFF game.exe -popupwindow -screen-width 1920 -screen-height 1080
This starts the game in a window with no borders (fake full screen). This way it will not minimize when it loses focus.
Make sure you select "run in background" in the unity settings.
Do i put this in the shell or other? @ECHO OFF game.exe -popupwindow -screen-width 1920 -screen-height 1080
Your answer
