[Github-comments] [geany/geany] Save window size and position unexpected restore behavior (Issue #2978)

xiota notifications at xxxxx
Tue Nov 2 06:47:21 UTC 2021


> No before this both position and size were saved with one option

Sorry.  I didn't look carefully earlier.

The (current) restore behavior *might* be related to the save behavior.  In [keyfile.c](https://github.com/geany/geany/blob/04566236d3f9811d55d6c7bcc492b3a60369fd20/src/keyfile.c#L605-L619), both position and geometry are saved when either `prefs.save_winpos` or `prefs.save_wingeom` is set.  Expected behavior would be to *not* save position or geometry when the respective setting is *not* set.

> letting tiling or other self organising window managers do their thing without being upset by Geany requests

Why would a "self organising" window manager be "upset by Geany requests"?

> ... there is a default size thats set if none is loaded IIUC.

It's in [libmain.c](https://github.com/geany/geany/blob/04566236d3f9811d55d6c7bcc492b3a60369fd20/src/libmain.c#L299-L300).  Since Geany sets (requests) the window size anyway, disrupting some window managers is probably not the reason for the current restore behavior.

> ... the use case for loading without saving is to set Geany window size and position the same for each restart, irrespective of changes you made in the previous session, thats your use-case so why do you would want to do that?

* When the settings are disabled, the default sizes may not make sense.  But if positions and sizes were previously saved, they're likely to be reasonable.
* When one setting is disabled, and the other enabled, the result may not make sense.  (More later.)
* A user may prefer Geany to start maximized, but need to occasionally unmaximize (eg, drag and drop files).  If Geany is closed in an unmaximized state, the user might want it to restart maximized as usual.

  * Starting maximized is currently only possible with `save_winpos=1` or `save_wingeom=1`.  (There is `fullscreen` in preferences, but it is different from maximized.  I don't know where it is in the preferences window.)

* This is the behavior implied by the option label and setting name.  *Save* window position/size.  (Not, *Restore* window position/size.  So this issue could be resolved by changing the name.)

> And finally the use case to save and restore so Geany continues where it left off so you can continue your previous session.

That use case would be unaffected.

> Perhaps the save and restore need to be decoupled... The whole sizing thing probably needs reconsideration for GTK3...

And also sidebar/msgwin save/restore behavior.  In [keyfile.c](https://github.com/geany/geany/blob/04566236d3f9811d55d6c7bcc492b3a60369fd20/src/keyfile.c#L1333-L1337), `save_winpos` controls restoring sidebar and message window positions.  If `save_winpos=1` and `save_wingeom=0`, the sidebar and message windows are set to sizes that don't necessarily fit the default window size.  (If sidebar/msgwin position is coupled to either setting, it should be `save_wingeom`, not `save_winpos`.)

> ... and also the heap of plugin manager sizing error messages when its first opened.

So that's where all those error messages are coming from...

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2978#issuecomment-957143375
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211101/4d78bf57/attachment-0001.htm>


More information about the Github-comments mailing list