Page MenuHome

Add a command line argument to allow starting Blender maximized
AbandonedPublic

Authored by Marcin Zawiejski (DragMZ) on Feb 8 2019, 12:38 PM.

Diff Detail

Repository
rB Blender

Event Timeline

+1, find this a better default, was there some reason we don't do this?

  • Note that this isn't correct if wm_init_state.override_flag & WIN_OVERRIDE_GEOM is set we want to follow arguments passed in via the command line.
  • wm_init_state should be changed too.
This revision is now accepted and ready to land.Feb 8 2019, 1:32 PM
Campbell Barton (campbellbarton) requested changes to this revision.Feb 9 2019, 7:12 AM

Id' like to get response from @Brecht Van Lommel (brecht) because there may be a reason this isn't default which he or Ton recalls.

Some changes are needed to this patch as noted.

This revision now requires changes to proceed.Feb 9 2019, 7:12 AM
Brecht Van Lommel (brecht) requested changes to this revision.EditedFeb 9 2019, 12:00 PM

I'm fine with this, assuming the changes are done.

Wouldn't it be better to move this into a setting in user preferences?
So that people can (like in most games for example) choose if they want blender to start in windowed mode or fullscreen. (Perhaps we can even add options for windowed fullscreen and true fullscreen).

BTW, we used to start maximized but we changed it to start in the windowed mode as this is was most programs do:
https://developer.blender.org/rB4d2efa877e305fc29121030120b7c53ae57950c4

I still think we should per default start in windowed mode, but let the user change this setting in the user preferences.

It already saves the window state if you save the startup file, no need for a preference.

I bet for the majority of users maximizing the window is one of the first things they do after starting Blender. Similar applications (3D apps, video editors, IDEs, ...) usually also start maximized. Most applications might not, but Blender is not an email client or music player.

If for some reason this is still considered bad, it should still maximize when the display resolution is not or just barely big enough to fit the default window dimensions.

IIRC the reason this was changed was because it caused issue like this https://developer.blender.org/T59802 happens on certain linux WMs and on windows too I assume.

Do not maximize window if window geometry override has been specified. Also set the default window state of wm_init_state to maximized.

@Brecht Van Lommel (brecht) @Campbell Barton (campbellbarton) but the last time this was brought up. It was decided to not maximize per default: https://developer.blender.org/T34580

So I guess we can discuss this during the meeting on monday.

@Sebastian Parborg (zeddb) a command line arg that let you maximize at startup seems reasonable in that case. That arg could be then used by the Windows installer so the Blender shortcut starts Belnder maximized on Windows.

@Sebastian Parborg (zeddb) a command line arg that let you maximize at startup seems reasonable in that case. That arg could be then used by the Windows installer so the Blender shortcut starts Belnder maximized on Windows.

That sounds resonable to me! :)

Blender is literally the only 3D/DCC app that starts in windowed mode, and it's truly annoying. So yes, maximized by default please.

Now, if only we could also get rid of the command line window that pops up when you start Blender on Windows OS, that would clean things a lot.

Marcin Zawiejski (DragMZ) retitled this revision from Maximize Blender window by default to Add a command line argumetn to allow starting Blender maximized.Feb 9 2019, 2:56 PM
Marcin Zawiejski (DragMZ) updated this revision to Diff 13572.

Add new command line argument (-m) to allow starting Blender maximized. Use the argument for Blender shortcuts on Windows.

Marcin Zawiejski (DragMZ) retitled this revision from Add a command line argumetn to allow starting Blender maximized to Add a command line argument to allow starting Blender maximized.Feb 9 2019, 2:56 PM

We don't need a command line argument or changes to the installer. A simple #ifdef _WIN32 is much easier to change behavior only on Windows.

But we should have better default behavior everywhere, this is not a Windows specific issue. Opening a window that fits the whole screen but is not maximized is just bad. On macOS there is not much of a distinction, but on Windows and Linux there is.

I bet that at least 95% of users run Blender maximized, it's one of the first things people change when opening Blender.

I can talk to @Ton Roosendaal (ton) about it changing the behavior.

IIRC the reason this was changed was because it caused issue like this https://developer.blender.org/T59802 happens on certain linux WMs and on windows too I assume.

That's about fullscreen, not maximized.

@Brecht Van Lommel (brecht) Just to be clear, I'm not against using maximized windows. I just feel that it should be a lot more intuitive how the state works.

For example, right now if I:

  1. Open up blender
  2. Maximize the window
  3. Save the start up file
  4. Reopen blender (now opens in a maximized state)
  5. Unmaximize the window
  6. Save the startup file
  7. Reopen blender (still opens maximized even though I saved it in an un-maximized state)

Blender will then always open maximized. I can't get it to start un-maximized unless I remove the saved startup file.

As evident from the requests, it seems like many users do not realize that they can have blender start in a maximized state if they save the startup file while in a maximized mode.

I looked around how some applications on Linux does it and in most cases they save the window state (maximized or not) when the application closes and uses that state on the next startup.
So I would suggest that as with the user pref settings, we move out the window settings outside the startup.blend file and then simply save the state when the program is closed and reuse it when blender is run the next time.

I looked around how some applications on Linux does it and in most cases they save the window state (maximized or not) when the application closes and uses that state on the next startup.
So I would suggest that as with the user pref settings, we move out the window settings outside the startup.blend file and then simply save the state when the program is closed and reuse it when blender is run the next time.

I have a patch that does this in D4291

The default Blender window state on Windows is clunky and for a beginner user it feels that it requires polishing. I think the window should be maximized by default on Windows.

Committed rB1daaa74b089875562117b3978e5fe9783c21bbf5, just not the installer changes.

Changing defaults can be handled separately, closing.

Submitted diff to change the defaults D4332