bugGNU Octave - Bugs: bug #57226, [GUI] Undocked editor position...


bug #57226: [GUI] Undocked editor position isn't reliably retained between Octave sessions

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Wed 13 Nov 2019 08:58:35 PM UTC
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  ttl
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:


( Jump to the original submission )

Sat 06 Aug 2022 08:00:26 AM UTC, comment #17: 

I am not seeing the issue from comment #15 anymore. Obviously it was fixed with the last changes in restoring floating widgets at restart (http://hg.savannah.gnu.org/hgweb/octave/rev/e2c8c852399e).

This should also be the reason for the different behavior of the editor pane, which is adjusted to the monitor that holds the main part of the widget. I hope your "workaround" is not required anymore, since changing from a two- to a one-monitor setting should now show the panes from the second monitor without problems.

Closing this bug as fixed.

Torsten Lilge <ttl>
Project Member
Fri 05 Aug 2022 01:06:22 PM UTC, comment #16: 

With dev Octave (and I suppose 7.1.0+) I haven't seen this behavior anymore for a long time. Various panes (Editor, Doc, Variable Editor) floating around on my dual monitor setup each appear where they were when Octave closed down the last time.

Only thing I see is that the Editor pane (which I usually have on the left side of the right screen, with a few pixels on the left screen so I can still grab it if I have to work on a single monitor desk) consistently shifts to the right so that its left border matches the right monitor screen limit. IOW the "some pixels"-overlap to the left screen is eliminated. I can live with that.

@Torsten: do you still see what you reported in comment #15?
Otherwise I think this bug report can be closed.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 16 Feb 2020 06:34:41 PM UTC, comment #15: 

I just realized that on my windows systems, other dock widgets behave even worse. They do not have to be closed on a second screen.

E.g., close the floating documentation widget, then closing octave, restarting octave and open the docs shows an icon for the docs in the task bar but no widget appears. Only a restart makes the docs widgets visible.   

Torsten Lilge <ttl>
Project Member
Sun 16 Feb 2020 02:24:41 PM UTC, comment #14: 

Right, but AFAICS it's only the editor which has this behavior. E.g., the Variable Editor and IIRC the Documentation pane behaves better.

Philip Nienhuis <philipnienhuis>
Project Member
Sun 16 Feb 2020 11:57:34 AM UTC, comment #13: 

Confirmed, but the important step is to close the editor before octave (as mentioned in comment #10). Otherwise the editor is correctly placed on the second screen at restart.

Torsten Lilge <ttl>
Project Member
Mon 03 Feb 2020 10:33:51 PM UTC, comment #12: 

A screenshot looks to be 498x400 AFAICS and that maks sense given the monitor dimensions (1920x1200).
Screenshot attached.

Philip Nienhuis <philipnienhuis>
Project Member
Mon 03 Feb 2020 08:50:49 PM UTC, comment #11: 

Philip, can you specify how small (approximately in pixels)  is very small when the editor reopens in the upper left corner. This might help to get a clue on what is going on.

Torsten Lilge <ttl>
Project Member
Sun 02 Feb 2020 10:11:19 PM UTC, comment #10: 

This issue has resurfaced (with dev Octave on at least Windows)
When I have the undocked Editor pane on my right monitor, with or without some pixels left on the left (main) monitor, and I close the Editor pane, close Octave, restart Octave and open the editor it is in the upper left of the main window and has a very small size.

(I can't test on Linux (and didn't when I tested last Nov) because since I upgraded from Mageia-5 to Mageia-6 and now Mageia-7, I cannot get the right monitor to work anymore in Linux :-(  (I spent many days experimenting with xorg.conf, xrandr and scouring the web for solutions, to no avail) )

Philip Nienhuis <philipnienhuis>
Project Member
Sat 16 Nov 2019 03:35:41 PM UTC, comment #9: 

Philip, thanks for testing. I pushed cset http://hg.savannah.gnu.org/hgweb/octave/rev/96d87e7093d0 for the window position.

Torsten Lilge <ttl>
Project Member
Sat 16 Nov 2019 02:51:15 PM UTC, comment #8: 

OK, file editor position is now properly retained between sessions (tried closing & opening octave 7 or 8 times); and a pristine Octave window is now also properly positioned (title bar fully visible).

Thanks very much Torsten!

Philip Nienhuis <philipnienhuis>
Project Member
Sat 16 Nov 2019 12:12:47 PM UTC, comment #7: 

The patch from comment #3 is still there to try. Building now.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 15 Nov 2019 01:57:58 AM UTC, comment #6: 

Works for me on Linux.  Marking as fixed and closing, but Philip can re-open if it is not working on Windows.

Rik <rik5>
Project Administrator
Thu 14 Nov 2019 09:34:04 PM UTC, comment #5: 

Sure I'll test but probably only next weekend.

Remarkable that fixing the editor closing issue would just be a one-liner. If all bug fixes would be that simple...

Philip Nienhuis <philipnienhuis>
Project Member
Thu 14 Nov 2019 09:17:05 PM UTC, comment #4: 

Saving the last editor state is fixed for me with cset http://hg.savannah.gnu.org/hgweb/octave/rev/fb9258fcf14b

Torsten Lilge <ttl>
Project Member
Thu 14 Nov 2019 08:56:44 PM UTC, comment #3: 

Regarding the issue with the main window location, could you please test the attached patch when you make an mxe-build next time?

(file #47867)

Torsten Lilge <ttl>
Project Member
Thu 14 Nov 2019 05:40:07 PM UTC, comment #2: 

<octave-gui.ini> - Thanks, that explains a bit. I must have missed that discussion.

Philip Nienhuis <philipnienhuis>
Project Member
Thu 14 Nov 2019 06:14:18 AM UTC, comment #1: 

Thanks for the extra report, which helps to keep track. I can confirm that the editor is not shown after a restart in some cases and will have a look at this. I guess, the issue with resetting the position to the default one has the same cause.

Another issue seems to be the default position, which apparently does not consider the height of the title bar. Related to this, if this happens, ins't Alt+Space an easier way to move the window with the keyboard?

Location of the settings file: Some time ago, we switched to a new, platform specific location of the settings file. If the new octave-gui.ini is not present, octave looks for the old one, before starting with the welcome wizard.

Torsten Lilge <ttl>
Project Member
Wed 13 Nov 2019 08:58:35 PM UTC, original submission:  

(Originally reported in bug #57198, but Torsten wrote that this is a separate issue)

What I get on my dual screen Win 7 box (Octave hg id e18237114cf8 Hide _appdata_ ....) is this:
1. Open editor, drag to on right screen.
2. Close Octave.
3. Reopen Octave. Editor appears on right screen, fine.
4. Close Octave and reopen again. Editor appears on right screen, fine.
5. Close, Octave, reopen 3rd time. Now, no editor is shown.
6. Open editor (through menu or typing "edit"). Editor appears on left screen in a small window.

I could very reliably reproduce this. After closing Octave for the third time the editor position is cleared. But after a few tries another scenario unfolded, see below.

Then I'm confused. Where does Octave keep its GUI settings nowadays? <HOME>\.config\qt-settings or <HOME>\Appdata\Roaming\octave\octave-gui.ini?

Deleting either one makes no difference, deleting both makes octave start the first-use screen.
Octave starts then with its title bar above the screen limits so can't be moved. The fix is to pull down the lower Octave screen border all the way down to the screen bottom, next moving the mouse cursor all the way up, then the Octave window shifts a tiny bit down, enough to grab a tiny strip of the title bar; use it to move the Octave window down and then resize it using the upper border.

The above mentioned bug (editor gone, or position reset) still showed after deleting the octave-gui.ini and qt-settings files.
But then, after a few tries the editor isn't reopened at all anymore automatically at Octave restart. Opening it manually gives the small pane in upper left corner on left screen.

octave-gui.diff (FileEditor lines before/after as per your request) attached.

Philip Nienhuis <philipnienhuis>
Project Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #48343:  Capture.JPG added by philipnienhuis (26KiB - image/jpeg)
file #47867:  main_window_location.patch added by ttl (852B - text/x-patch)
file #47862:  octave-gui.diff added by philipnienhuis (710B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by philipnienhuis (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only project members can vote.





    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-06 ttl StatusNone Fixed
        Open/ClosedOpen Closed
    2020-02-16 rik5 Carbon-CopyRemoved 72865 -
    2020-02-03 philipnienhuis Attached File- Added Capture.JPG, #48343
    2020-02-02 philipnienhuis StatusFixed None
        Open/ClosedClosed Open
    2019-11-15 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2019-11-14 ttl StatusNone Ready For Test
    2019-11-14 ttl Attached File- Added main_window_location.patch, #47867
    2019-11-14 ttl Assigned toNone ttl
        Operating SystemMicrosoft Windows Any
    2019-11-13 philipnienhuis Attached File- Added octave-gui.diff, #47862

    Back to the top

    Powered by Savane 3.9