Save window geometry upon exit / Remember window positions / Store window size/location between games

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Save window geometry upon exit / Remember window positions / Store window size/location between games

Post by Koub »

Well title says it all : I'd like Factorio to remember its window geometry (size & position) when I exit the game, so that I don't have to resize and move it the same way every time I launch the game. People who play in full screen probably don't have this need, but I play in windowed mode, with a few windows opened all around I like to keep an eye on, and that would help a lot (me, and people who play in windowed mode like me ^^).

I'm sure it's not that hard to add as a feature, but it would be sooooo nice :mrgreen:
Last edited by ssilk on Fri Jun 25, 2021 12:59 pm, edited 2 times in total.
Reason: Changed title due to progress of thread
Koub - Please consider English is not my native language.

User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Phillip_Lynx »

Hmm ...

I play Windowed (due to recording issues) and my factorio remembers its position and size. Do you have Admin rights on your harddrive?

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

I do, but Factorio is run with user privilege, not admin. Apps should not be run with admin privileges on regular basis.
However, I have tried to launch Factorio with admin rights to see if it changes anything ; it didn't.
Koub - Please consider English is not my native language.

User avatar
Phillip_Lynx
Filter Inserter
Filter Inserter
Posts: 541
Joined: Mon Jul 21, 2014 6:00 pm
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Phillip_Lynx »

My factorio also runs with normal user privileges.

But at my work I sometimes come to problems when Users do not have the right to write to certain directory a cfg-file (named fin.zup :)). So personal settings are not stored and their programs start every time with the standard settings.

Wich OS do you have? With Windows 7 there are no problems for me to start factorio with stored geometry.

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

Re: Could Factorio window geometry be saved upon exit ?

Post by bobingabout »

When I read the title, this isn't the idea that popped into my head.

I was thinking in-game windows, such as your inventory. They should be able to be resized (so that they don't fill the entire screen every time you open them, and scroll bars apear and disapear as needed) as well as moved, and that once closed, they remember their size and position, so that when you open the same menu again next time, they're the same size in the same place.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by MF- »

Your window manager can't remember / set-to-configured-values the geometry?
Why do you use something so crappy? Pity you can't change to just anything else really :P

(Feel free to ignore this post. Though I'd like to learn if there actually is a WM that can't do it.
Not counting tiling-only window managers that don't support free-floating windows of course.)

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by MasterBuilder »

Factorio never seems to remember window position, size, or window state for me.

I keep the game in windowed mode and maximize it whenever I play. (Makes it easy to switch to things on the other monitors.)
Every time I launch the game it's position is reset to dead-center of the primary monitor with a size I estimate to be 640*360.

It's not the window size that bugs me but the fact that it won't remember to be maximized that's irksome.

I've tried setting the shortcut properties to maximized. I've tried using "start /max factorio.exe". (Both flash a maximized window before restoring the default one.)

System: Win7 x64. Using the x64 zip package.
Game runs from: "O:\Program Files\Factorio\bin\x64". It was never 'installed' I just placed it there and set up shortcuts myself. ("Manual installation" if you will.)
I have full write access to that folder (I am also CREATOR OWNER.) and any changes made in the game are reflected in "Factorio\config\config.ini" and persist after restarting.
I have never run the game with admin privileges and will continue not doing so on principal. (If this is needed for the fix just tell me where it's trying to write and I will alter the permission myself.)
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

I'm sorry I didn't think to specify the OS I'm running on, not used to play on games that can be run on OSX, Linux, and Windows :mrgreen:.
I'm on Windows 7 x64 SP1 Integral edition.

Hereunder Factorio aspect upon launch. This is the default game window size. I don't like to have it run maximized or in full size, I prefer to play Factorio in a custom window size.
Attachments
Factorio window geometry.jpg
Factorio window geometry.jpg (862.48 KiB) Viewed 9348 times
Koub - Please consider English is not my native language.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by MF- »

I haven't actually tried asking my WM to resize the game (my screen is tiny compared to yours).
Perhaps I would see the same problem of the game shrinking itself back like you did.

Then one might try using some window-commanding cli tools to resize the window X seconds after start.
I think there must be such tools available for windows as well.

EDIT: Strange that your windows 7 x64 cannot run factorio with stored geometry, while Phillip_Lynx's windows 7 can.

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

Most of the apps I use do remember their size and positioning, so I don't think it's a general misbehaviour of my computer.
Maybe is there something in my config that specifically prevents Factorio storing its windows position and size ? That seems particularly unlikely (but not impossible).

I have made sure I have full access on the Factorio root folder and subfolders, as well as on the %APPDATA%\Factorio\ folder and subfolders.
I used Factorio x64 installer to install it.

I'm downloading the x86 and x64 zip files to compare behaviours, I'll try them tomorrow morning : it's getting late, time to sleep ^^
Koub - Please consider English is not my native language.

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

I have tried the Windows x86 and Windows x64 zip package, and behaviour is the same : whatever the game window geometry when I exit the game, it's always the same small window when I launch it again.
Koub - Please consider English is not my native language.

JackGruff
Fast Inserter
Fast Inserter
Posts: 134
Joined: Tue Oct 15, 2013 4:44 pm
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by JackGruff »

You can try using nircmd. http://www.nirsoft.net/utils/nircmd.html

Put nircmd.exe inside the bin folder and put this bat file in as well.

Code: Select all

START Factorio.exe
nircmd.exe cmdwait 1000 win setsize ititle "Factorio" 30 30 1000 500 
The last four numbers are position from left, right, width and height in pixels. The first number is a delay in milliseconds.

You also get a nice borderless effect if Factorio is set to fullscreen.
Attachments
Capture.jpg
Capture.jpg (156.5 KiB) Viewed 9090 times

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

Thanks for the tip, after a grat lot of tries, I managed to put the window exactly at the size and place I wanted to.
However, I still think the game souldn't need a third party tool to redim its window size and pos at every launch.
Koub - Please consider English is not my native language.

MF-
Smart Inserter
Smart Inserter
Posts: 1235
Joined: Sun Feb 24, 2013 12:07 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by MF- »

Congrats
However, I still think the WM of Microsoft shouldn't need a third party tool to provide basic WM functionality :P

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Could Factorio window geometry be saved upon exit ?

Post by Koub »

Windows' Window Manager does provide basic WM functionality. Some of my software (Skype, Mumble, Steam, Firefox, Chrome, Paint.net, and many others) take advantage from it and remember their size/position when closed and reopened. Some others (Ultra Edit 32 v10, some games, including Factorio) do not and reset their size/position every time I run them. Some of my apps/games remember the size, but not tho position.

So it's not a matter of WM functionality, but a matter of software not taking advantage of it. I'd really be happy if the devs could give it a look, I'm pretty sure it wouldn't need a huge overhaul, and would be a blessing for us all who don't play in full screen on Windows :roll:
Koub - Please consider English is not my native language.

User avatar
Thomasnotused
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Jan 29, 2015 9:58 pm
Contact:

Windows Resolution

Post by Thomasnotused »

joined, identical -- ßilk

I know that you can manually resize the game window to suit your needs, however, I would greatly appreciate an in-game or .ini option for saved resolution whilst in windowed mode. Could save valuable screen real-estate :)
I have no idea what I'm doing.

Zhall
Inserter
Inserter
Posts: 31
Joined: Wed May 13, 2015 10:02 pm
Contact:

Remember position of inventory menu

Post by Zhall »

I think it would be better if the inventory menu remembered where you dragged it during the last time you had it open.

Every time I open it, it ends up being in the way of where I want to place things.

Thanks :D

Koub
Global Moderator
Global Moderator
Posts: 7198
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: Remember position of inventory menu

Post by Koub »

Had never noticed it could be moved :lol:
Koub - Please consider English is not my native language.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Remember position of inventory menu

Post by Peter34 »

Koub wrote:Had never noticed it could be moved :lol:
Me neither...

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

Re: Remember position of inventory menu

Post by bobingabout »

Although it hasn't bothered me personally, I've heard my friend complain about this before. "Every window should open where it was when you closed it" he says.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Ideas and Suggestions”