[SOLVED] application minimizes

Suggestions that were added to the game.
Post Reply
XaLpHa89
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Jan 24, 2018 6:59 am
Contact:

[SOLVED] application minimizes

Post by XaLpHa89 » Fri Oct 05, 2018 7:37 am

When I switch to the desktop using the Windows key because I just want to do something different for a short time, the Factorio application minimizes itself. If I now open another application, the Factorio application forces itself directly into the background.
Last edited by XaLpHa89 on Wed Jan 16, 2019 12:11 am, edited 1 time in total.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 6167
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: application minimizes

Post by bobingabout » Fri Oct 05, 2018 8:22 am

I believe that's only an issue when you use fullscreen mode, as it is effectively borderless full screen window, and you the same thing happens with other borderless full screen programs.
if you press the minimise button in window mode, it doesn't happen.

Instead of pressing the windows key, try pressing alt + Tab instead, I'm fairly sure this actually minimises the game rather than just showing the desktop for a moment, and you have less problems with it.


Though on a semi-related note, I also hope that the devs are working on it so the graphics actually stop being drawn when the game is minimised as a lot of games do. it's fairly annoying to not get your graphics power back for whatever you do want to look at just because Factorio is running minimised. It's not like the game even needs the graphics to continue the simulation, Factorio is one of those ideal games where graphics can just be turned off and it runs fine, so it shouldn't be wasting graphics power when minimised.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.

posila
Factorio Staff
Factorio Staff
Posts: 2806
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: application minimizes

Post by posila » Fri Oct 05, 2018 9:18 am

XaLpHa89 wrote:
Fri Oct 05, 2018 7:37 am
When I switch to the desktop using the Windows key because I just want to do something different for a short time, the Factorio application minimizes itself. If I now open another application, the Factorio application forces itself directly into the background.
In 0.17 fullscreen game will minize if you alt+tab out of it, as it is default behavior in SDL. We might add option to disable this behavior, but when I tested it, it seemed SDL is much more stubborn about keeping its borderless fullscreen window on top than Allegro was.
bobingabout wrote:
Fri Oct 05, 2018 8:22 am
Though on a semi-related note, I also hope that the devs are working on it so the graphics actually stop being drawn when the game is minimised as a lot of games do. it's fairly annoying to not get your graphics power back for whatever you do want to look at just because Factorio is running minimised. It's not like the game even needs the graphics to continue the simulation, Factorio is one of those ideal games where graphics can just be turned off and it runs fine, so it shouldn't be wasting graphics power when minimised.
Rseding implemented it in 0.16.0 for Windows version. In 0.17 it should work on all OSes. There is an config.ini option to disable this behavior "halting-rending-when-minimized", but it is enabled by default ... other than that nobody works on this any further. (Note: the game needs to be minimized, being under some other window is not enough)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2604
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: application minimizes

Post by eradicator » Fri Oct 05, 2018 10:28 am

posila wrote:
Fri Oct 05, 2018 9:18 am
it seemed SDL is much more stubborn about keeping its borderless fullscreen window on top than Allegro was.
Maybe i'm misunderstanding what you mean by "on top" here... but for me the main point of "borderless fullscreen" is that it behaves mostly like a window. I.e. that i can "stack" it with other windows and push other windows in front of it as i see fit? I.e. the only differences i expect there to be when something calls itself "borderless fullscreen" is that it a) doesn't have a window border and b) that it doesn't cover the task bar when it's not the active window.
Regrettably factorio currently can't do that so i'm stuck with a normal window (i guess i could hack an autohotkey script to force that behavior since factorio behaves quite nicely when resizing the window).
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2604
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: application minimizes

Post by eradicator » Fri Oct 05, 2018 10:42 am

posila wrote:
Fri Oct 05, 2018 9:18 am
bobingabout wrote:
Fri Oct 05, 2018 8:22 am
Though on a semi-related note, I also hope that the devs are working on it so the graphics actually stop being drawn when the game is minimised as a lot of games do. it's fairly annoying to not get your graphics power back for whatever you do want to look at just because Factorio is running minimised. It's not like the game even needs the graphics to continue the simulation, Factorio is one of those ideal games where graphics can just be turned off and it runs fine, so it shouldn't be wasting graphics power when minimised.
Rseding implemented it in 0.16.0 for Windows version. In 0.17 it should work on all OSes. There is an config.ini option to disable this behavior "halting-rending-when-minimized", but it is enabled by default ... other than that nobody works on this any further. (Note: the game needs to be minimized, being under some other window is not enough)
While testing that option (though not affected by the option) i just noticed that i get huge CPU usage increases when i minimize factorio. On a fresh map i get 8% utilization when the window is active, and 20% when i minimize the game. Similarly on a large factory it goes from 19% to 24% utilization.
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

posila
Factorio Staff
Factorio Staff
Posts: 2806
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: application minimizes

Post by posila » Fri Oct 05, 2018 12:15 pm

eradicator wrote:
Fri Oct 05, 2018 10:28 am
Maybe i'm misunderstanding what you mean by "on top" here... but for me the main point of "borderless fullscreen" is that it behaves mostly like a window. I.e. that i can "stack" it with other windows and push other windows in front of it as i see fit? I.e. the only differences i expect there to be when something calls itself "borderless fullscreen" is that it a) doesn't have a window border and b) that it doesn't cover the task bar when it's not the active window.
Regrettably factorio currently can't do that so i'm stuck with a normal window (i guess i could hack an autohotkey script to force that behavior since factorio behaves quite nicely when resizing the window).
So, DirectX has concept of exclusive fullscreen - the application takes exclusive ownership of the picture on screen, possibly even changes display mode (resolution, refresh rate, color depth) and rendered image goes directly to the screen. If you alt+tab from such application, your screen(s) might blink as they change mode back to desktop and it usually takes a second to swich into or out of the application. From the programming stand point - the application has window, but its size is completely irrelevant, as backbuffer can have any arbitrary size and since we don't render to the window.

Borderless fullscreen, to me, is when application renders to its window (so rendered image doesn't go to screen directly, but to compositing window manager in OS), but dimensions and properties of the window are such that it covers entire screen (including task bar). Advantage is that switching to different window works like in any other application - so it is instant. Disadvantage is that the window needs to force itself on top of things that don't want to be covered by windows normally (like task bar) - or somehow hide those things. It seems there is no standard way how to do it right. For me, 0.16 works perfectly fine on all my computers - if I alt+tab out of fullscreen, I can interact with desktop, other applications and task bar, but I know Twinsen was able to reproduce some weird behavior under some circumstances. SDL seems to be more aggresive in keeping its window top-most, so that's probably why by default it minimizes when alt+tabbing out of it. (EDIT: it might not be more aggressive, it might be just different from Allegro, and while Allegro behaved nicely for me, SDL doesn't)

In my opinion, borderless fullscreen gives superiour user experience on multimonitor setups (I can interact with different application on other screen without weird transitions between exclusive fullscreen and desktop); exclusive fullscreen is probably better for laptops, as is doesn't have to deal with rest of the desktop when rendering, or offers option to lower resolution.

In OpenGL, there is no concept of exclusive fullscreen, but it seems to me, the drivers trigger it automatically when OpenGL context renders to a window surface that covers entire screen.

EDIT2: Tested it again on my work computer (previously I was testing it on my home computer) and SDL behaved same as Allegro (when auto-minimize was disabled). That is - when working with application on other screen, Factorio still covered task bar, but once I alt+tabbed to different application on the same screen as Factorio, task bar showed up.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2604
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: application minimizes

Post by eradicator » Fri Oct 05, 2018 3:31 pm

posila wrote:
Fri Oct 05, 2018 12:15 pm
EDIT2: Tested it again on my work computer (previously I was testing it on my home computer) and SDL behaved same as Allegro (when auto-minimize was disabled). That is - when working with application on other screen, Factorio still covered task bar, but once I alt+tabbed to different application on the same screen as Factorio, task bar showed up.
Sounds promising. I use a laptop with an attached screen when one is available / when i'm in the mood. So i don't have a stable monitor count, but i also don't want to constantly switch window modes (and i do prefer borderless even for single monitor so i can peak at the game through the window seams). Also thanks for the detailed explanation :).
Author of: Hand Crank Generator, Screenshot Hotkey 2.0
Mod support languages: 日本語, Deutsch, English

XaLpHa89
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Jan 24, 2018 6:59 am
Contact:

Re: application minimizes

Post by XaLpHa89 » Sun Oct 07, 2018 9:54 am

I am pleased that this topic has caused some discussion. I am on a Windows 10 system. I'm not sure if I understood everything. With ALT + TAB I can jump between applications. My approach is, I press CMD + D and want to work on the desktop without any application sliding back into the foreground.

Image

XaLpHa89
Burner Inserter
Burner Inserter
Posts: 19
Joined: Wed Jan 24, 2018 6:59 am
Contact:

Re: [SOLVED] application minimizes

Post by XaLpHa89 » Wed Jan 16, 2019 12:14 am

The solution is the use of: [ALT]+[ENTER]
So jumping between full screen and window screen.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 1841
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [SOLVED] application minimizes

Post by Optera » Wed Jan 16, 2019 11:19 am

Current builds have the habit of sometimes refusing to go to the background when alt-tabbing out of factorio during launch on Win10 64bit.

I sometimes have to click into factorio then tab out again to see my other windows. May or may not have something to do with me launching factorio from batch script.

Post Reply

Return to “Implemented Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests