What I did: I opened Geany (I'm sure that Geany was maximized). I changed the size of the sidepanel at about 50%, so 50% editor and 50% sidepanel. I closed Geany. I reopened Geany.
Result It was not any more 50% editor and 50% sidepanel. I tried it many times.
Then I did something like this: I changed the size of the window, then I changed the size of the sidepanel. Then I closed Geany. I reopened Geany. Then I maximized Geany. And now it works properly, so the size of the sidepanel is remembered after a restart of Geany.
Help->Debug Message: 19:59:04.823621: Geany INFO : Geany 1.39, de_DE.UTF-8 19:59:04.823671: Geany INFO : GTK 3.24.25, GLib 2.68.1 19:59:04.823775: Geany INFO : OS: Ubuntu 21.04 (hirsute) 19:59:04.823790: Geany INFO : System data dir: /usr/share/geany 19:59:04.823811: Geany INFO : User config dir: /home/p/.config/geany 19:59:04.850572: GLib-GIO DEBUG : _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’ 19:59:05.119492: fcitx-connection DEBUG : _fcitx_connection_create_ic 19:59:05.119580: fcitx-connection DEBUG : _fcitx_connection_watch 19:59:05.429084: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany.css' 19:59:05.432322: Geany INFO : Loaded GTK+ CSS theme '/usr/share/geany/geany-3.20.css' 19:59:05.451231: Geany INFO : System plugin path: /usr/lib/x86_64-linux-gnu/geany 19:59:05.481015: Geany INFO : Added filetype Clojure (65). 19:59:05.481054: Geany INFO : Added filetype Kotlin (66). 19:59:05.481076: Geany INFO : Added filetype Graphviz (67). 19:59:05.481097: Geany INFO : Added filetype Groovy (68). 19:59:05.481130: Geany INFO : Added filetype Arduino (69). 19:59:05.481152: Geany INFO : Added filetype TypeScript (70). 19:59:05.481173: Geany INFO : Added filetype Meson (71). 19:59:05.481193: Geany INFO : Added filetype JSON (72). 19:59:05.481213: Geany INFO : Added filetype Cython (73). 19:59:05.481233: Geany INFO : Added filetype Genie (74). 19:59:05.481254: Geany INFO : Added filetype Swift (75). 19:59:05.481274: Geany INFO : Added filetype Nim (76). 19:59:05.481294: Geany INFO : Added filetype Scala (77). 19:59:05.481326: Geany INFO : Added filetype CUDA (78). 19:59:05.534565: Geany INFO : Loaded libvte from libvte-2.91.so.0 ...
I can't follow your steps to reproduce there seems to be missing steps. I presume you built from nightly tarball to get a 1.39, unfortunately that doesn't say what the git was when you built it as it does for built from git (see below), 1.39 is still in development so things can change at any point.
I ran Geany:
``` (null): Geany INFO : Geany 1.39 (git >= b7558417), en_AU.UTF-8 (null): Geany INFO : GTK 3.24.20, GLib 2.64.6 (null): Geany INFO : OS: Linux Mint 20 (ulyana) ``` on a separate config ie `geany -c /tmp/something` and did:
1. start Geany, starts with the default size, not maximised 2. maximise geany, close and reopen, sidebar has same width 3. change sidebar width, close and reopen, sidebar retains new width 4. unmaximise geany, size and position is defined by the WM I suspect since Geany has no record of the pre-maximise values, but sidebar is the same width _in pixels_ not percent. 5. close and reopen, sidebar retains the same width
AFAIK thats the expected behaviour. If yours behaves differently can you post the values of the `treeview_position` and `geometry` from `/tmp/something/session.conf`
@elextr Now everything works fine, so I can't reproduce the issue, nor with maximized window, nor with not maximized window, and nor with different position of the not maximized window. But the issue was there, and many times it was there, till I started to play around with the window size. I played with the window size only because of the comment of a user in https://github.com/geany/geany/issues/2562#issuecomment-665994757. Next time it will happen, I would like to publish of the treeview_position and geometry from `/tmp/something/session.conf`. The problem: I can't find /tmp/something/session.conf. I find only /tmp/.
I can't find /tmp/something/session.conf.
You have to tell Geany to use the alternative config by starting from the command line with the `-c /tmp/something` . I picked `/tmp/something` because it is unlikely to exist so no other settings get in the way and Geany will create it with default values then it gets deleted automagically when the machine is shutdown.
If it happens again look for `session.conf` in whatever config you are using, default `your home directory/.config/geany`
you can re-open if you get more information
Closed #3070.
@elextr
You write in your comment https://github.com/geany/geany/issues/3070#issuecomment-1001285590 several times "reopen". Before I start testing: Should I reopen Geany always from the terminal?
@ralf3u to be able to specify the config with `-c` you have to run from the terminal, and to be clear all occurrances of "start" or "reopen" means `geany -c /tmp/something` on the terminal command line (hint: on a ubuntu shell the uparrow key recalls the previous command so you don't retype it, saves time and makes it identical).
@elextr To your tests mentioned in https://github.com/geany/geany/issues/3070#issuecomment-1001285590:
I made the test on an other computer and everything works fine. On the computer where I had the issue the test does not work fine (see point 3). Here the result step by step:
That is the content of session.conf after rebooting the computer: [geany] fullscreen=false treeview_position=1173 msgwindow_position=816 geometry=415;400;1501;535;1;
Then I do point 1. Then I do point 2. Result: sidebar has same width. After closing Geany, that is the content of session.conf:
[geany] fullscreen=false treeview_position=1173 msgwindow_position=816 geometry=415;400;1501;535;1;
Then I do point 3. "sidebar retains new width": NOT IN MY CASE!! The width is exactly like point 2. After closing Geany, that is the content of session.conf:
[geany] fullscreen=false treeview_position=1173 msgwindow_position=816 geometry=415;400;1501;535;1;
Then I do point 4. "but sidebar is the same width in pixels not percent": That is the case. After closing Geany, that is the content of session.conf:
[geany] fullscreen=false treeview_position=1173 msgwindow_position=816 geometry=415;400;1501;535;1;
Then I do point 5. "sidebar retains the same width": That is the case. After closing Geany, that is the content of session.conf: [geany] fullscreen=false treeview_position=1173 msgwindow_position=816 geometry=415;400;1501;535;1;
I'm not sure what you are doing, but I asked for `/tmp/something/session.conf` "after each time you close Geany in the steps above. Use another editor to look at the file, want Geany closed.". There are only three "close" instructions in that list but you have pasted five sets of identical values.
What I get at the three points where Geany is closed are:
``` treeview_position=156 geometry=0;0;2560;1388;1; ```
``` treeview_position=912 geometry=0;0;2560;1388;1; ```
``` treeview_position=912 geometry=320;0;1920;1388;0; ```
Note the change in `treeview_position` when the sidebar is resized and the change in geometry when Geany is unmaximised. These are expected.
Also I notice you have provided the value of "fullscreen". Full screen is _NOT_ maximised, maximised is the window control not `View->Fullscreen` (assuming whatever window manager you are using on Ubuntu has a maximise control). If you mean fullscreen that is a different thing.
Use another editor to look at the file, want Geany closed
I did that with FeatherPad.
Also I notice you have provided the value of "fullscreen". Full screen is NOT maximised,
I did not go in fullscreen. I did maximize the window.
But now I know what I did wrong: I menrtioned the values of session.conf that is located in .config/geany and not in /tmp/something. So, I will redo the test. Sorry for my mistake.
@elextr To your tests mentioned in https://github.com/geany/geany/issues/3070#issuecomment-1001285590
I do point 1.
Then I do point 2. "maximise geany, close" After closing Geany, that is the content of session.conf that is located in /tmp/something: [geany] fullscreen=false treeview_position=165 msgwindow_position=398 geometry=-1;-1;-1;-1;1;
Then I do point 3. "change sidebar width, close" After closing Geany, that is the content of session.conf that is located in /tmp/something: [geany] fullscreen=false treeview_position=165 msgwindow_position=398 geometry=-1;-1;-1;-1;1; "and reopen, sidebar retains new width": NOT IN MY CASE!! The width is exactly like point 2.
Then I do point 4. "but sidebar is the same width in pixels not percent": That is the case. So, the size is like point 2.
Then I do point 5. "close" After closing Geany, that is the content of session.conf that is located in /tmp/something: [geany] fullscreen=false treeview_position=165 msgwindow_position=644 geometry=0;0;1366;846;0; "sidebar retains the same width": That is the case. So, the size is like point 2.
I made a test: If fullscreen would be turned on, then the value is `fullscreen=true` after closing Geany.
If fullscreen would be turned on, then the value is fullscreen=true after closing Geany.
Yes, but remember the values you had posted before were wrong, so the fact that "fullscreen" was false did not tell me what you were doing :-)
The result you got from point 3 does not make sense, it has not saved a new sidebar width, it is still 165 which is why Geany reopens with that. What are you doing to "change the sidebar width"?
Maybe we are not talking about the same thing, I mean the width of the "symbols" or "documents" tree on the left of the edit window.
The result you got from point 3 does not make sense, it has not saved a new sidebar width, it is still 165 which is why Geany reopens with that. What are you doing to "change the sidebar width"?
I grabbed with the mouse the vertical line between editor and sidepanel and moved it. So instead of having about 10% and 90% I changed it to 50% and 50%.
As I mentioned before, on an other computer the test works fine, but not on this computer. Both are running with Lubuntu 21.04. I'm not a software developer, but for me it seems to be that Geany is the problem.
but for me it seems to be that Geany is the problem.
Yes, but since only one computer can reproduce the problem the question is what is the difference between the two computers, exactly which version of Geany 1.39? Which version of GTK and Glib, anything else different?
Reopened #3070.
... which version of Geany 1.39? Which version of GTK and Glib, ...
Exactly the same. I got Geany 1.39 by PPA, described in https://github.com/xiota/geany-preview.
Well, I'm afraid we don't know what that PPA provides, its a personal archive. It might be better to build Geany from a nightly tarball, then you know its exactly the same since its made from the same tarball.
But then when you are sure its exactly the same Geany on both systems then it comes back to what is different between the two systems? The same Geany can't behave in differing ways unless the underlying system is different.
@elextr
But then when you are sure its exactly the same Geany on both systems then it comes back to what is different between the two systems? The same Geany can't behave in differing ways unless the underlying system is different.
Maybe the versions of Geany are different because now I remembered that I had problems with this computer when installing Geany 1.39.
My suggestion: Close this issue. When I will install Lubuntu 21.10 on both computer, I will first install Geany by sudo apt install geany. Then I will do on both computer the test, so with Geany 1.38. If everything is fine, then I will install Geany by PPA. And if the issue is still there, then it could be that the issue has to do with the private archive. I will try to do also the test when Geany 1.39 is officially released. Is it OK like this?
@ralf3u That is my PPA. It was last built on 2021-11-30, and has several [patches](is:open is:pr author:xiota) that have not been merged (probably based on d8f2f14a16fe57fb1a98e767a2263846a0135431). (A one-line description of each patch is noted in the deb changelog.) That is the same build I have been using, and I have not personally had any problems with it.
One of the patches is #2979, which changes save/restore of geometry and position. However, I am unable to reproduce your issue with Kubuntu or XFCE. Since you have two computers behaving differently, there is probably something different between the two that is causing your issue.
What window manager are you using on each computer?
Do you still this problem when you disable all Geany plugins?
Do you still have this problem when you start Geany with a new config?
<pre>geometry=-1;-1;-1;-1;1;</pre>
Those values represent xpos; ypos; width; size; maximized. `-1;-1;-1;-1;0` are the default values when a new config is created. Geany normally rewrites the default values when the config is saved. My patch leaves some of the values alone when "Save window size" or "Save window position" are disabled.
In Edit / Preferences / General / Startup / Shutdown, what are the states of the checkboxes for "Save window size" and "Save window position"? (If either is unchecked, then sidebar position might be *expected* to *not* be saved.)
-----
When I run the elextr's scenarios, the behavior is as described, but the specific saved values are sometimes different than with unpatched Geany. (Unpatched Geany saves maximized window sizes when the window is maximized. My patch always saves the unmaximized size.)
1. start Geany, starts with the default size, not maximised 2. maximise geany, close... <pre>treeview_position=165<br/>msgwindow_position=399<br/>geometry=350;150;900;600;1;</pre> and reopen, sidebar has same width
3. change sidebar width, close... <pre>treeview_position=336<br/>msgwindow_position=399<br/>geometry=350;150;900;600;1;</pre> and reopen, sidebar retains new width
4. unmaximise geany... sidebar is the same width in pixels not percent. 5. close... <pre>treeview_position=336<br/>msgwindow_position=399<br/>geometry=350;150;900;600;0;</pre> and reopen, sidebar retains the same width
Closed #3070.
@xiota I updated the system. Then I did again the test mentioned in https://github.com/geany/geany/issues/3070#issuecomment-1001285590. And now the test works fine.
github-comments@lists.geany.org