bugGNU Octave - Bugs: bug #40485, (MinGW) Undocked (editor) pane...

 
 

bug #40485: (MinGW) Undocked (editor) pane position not rembered across restart

Submitter:  Philip Nienhuis <philipnienhuis>
Submitted:  Tue 05 Nov 2013 08:46:03 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  * Closed
Release:  * dev Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 14 Nov 2013 06:25:07 PM UTC, comment #23: 

You're welcome.
Remembering minimized state added with changeset
http://hg.savannah.gnu.org/hgweb/octave/rev/97bde75d4119


Torsten Lilge <ttl>
Group Member
Thu 14 Nov 2013 01:27:09 PM UTC, comment #22: 

(Found some time in between the scenes.)

@Torsten:

This last patch solves all outstanding (editor) pane position issues.
Please push & close this bug report.

Thanks very much again!

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Nov 2013 10:05:10 PM UTC, comment #21: 

Well you are determined to get this fixed, thank you very much.

Hopefully I can build & test tomorrow night or Friday (occupied these days).

Philip Nienhuis <philipnienhuis>
Group Member
Wed 13 Nov 2013 07:43:34 PM UTC, comment #20: 

Yes, thanks for testing. Step 4 shows that the minimized state is remembered during hiding the widget. The attached patch stores the minimized state in the settings file for the the next start.

(file #29611)

Torsten Lilge <ttl>
Group Member
Wed 13 Nov 2013 03:11:47 PM UTC, comment #19: 

(Just tried on Win8)

1 Undock Documentation panel (shows up), move & resize a bit
2 Minimize it using title bar (only taskbar button is seen now)
3 Remove check in Octave Main window before Documentation (taskbar button disappears)
4 Add check in Octave Main window before Documentation (Taskbar button for Documentation reappears)
5 Click on that taskbar button (Documentation window is restored to after step 1)

Is this what you mean?

Philip Nienhuis <philipnienhuis>
Group Member
Tue 12 Nov 2013 08:54:51 PM UTC, comment #18: 

It is not complicated to store and restore the minimized state, too. What happens if you hide a minimized widget with the window menu and show it again. Is it shown minimized (as for me on linux) or normal?

Torsten Lilge <ttl>
Group Member
Tue 12 Nov 2013 08:27:19 PM UTC, comment #17: 

While I understand that an undocked window is "independent", yet it somehow "knows" that it belongs to the Octave main window simply because the "dock" button works; <F9> works; debug buttons work; etc.
So it can't be completely independent. It also isn't a completely stand-alone program.

Anyway, let's keep this as feature request then. Perhaps later on a solution will emerge.
Thank you very much for your time & involvement.

Shall I lower the priority and set status to "postponed"?

Philip Nienhuis <philipnienhuis>
Group Member
Tue 12 Nov 2013 06:29:50 PM UTC, comment #16: 

Okay, then I have confused "hide" and "minimize".
I am not sure whether can really be expected that a minimized dock-widget (which is an independent window when floating) should restart minimized. If a program is closed while minimized it won't restart minimized.

Torsten Lilge <ttl>
Group Member
Tue 12 Nov 2013 05:12:27 PM UTC, comment #15: 

Doesn't work :-(

A minimized (to the taskbar) editor window is restored (visible) again after Octave restart. Tried on XP and Win7

Philip Nienhuis <philipnienhuis>
Group Member
Tue 12 Nov 2013 05:40:06 AM UTC, comment #14: 

Yes, it minimizes all floating panes (which should already be the case by making them floating) but those who are marked as visible in the settings are remade visible after the main window is shown (for systems with global menu bar showing "Octave" instead of "Editor" or something else in the global menu bar).

Torsten Lilge <ttl>
Group Member
Mon 11 Nov 2013 09:41:52 PM UTC, comment #13: 

Well you're quick! Thx

I can only try tomorrow evening.

Looking at the patch, does it always hide (minimize)floating panes unconditionally on Octave startup? (whether it was visible or not on last Octave close down?)

Philip Nienhuis <philipnienhuis>
Group Member
Mon 11 Nov 2013 07:00:31 PM UTC, comment #12: 

The behavior seems to depend on the window manager. When inverting the "#if define (Q_OS_WIN32)" statements, i.e. using the handling of floating widgets for windows on my linux system I get the following:

  • A floating and hidden widget is still hidden after a restart
  • When activating this window it is shown docked


Attached a patch that explicitly hides a floating widget at startup before it is eventually shown depending on the visibility stored in the settings. From the docs a widget is automatically hidden when unparented (what is done here) but this is obviously not the case on your system.


(file #29596)

Torsten Lilge <ttl>
Group Member
Mon 11 Nov 2013 06:11:33 PM UTC, comment #11: 

I pushed a fix for the initial position of floating widgets at startup with cset
http://hg.savannah.gnu.org/hgweb/octave/rev/14c427b5c5c1

The issue from comment #10 should not happen since the widget's visibility is also stored in the settings and is used at startup for the initialization of the widget. I will have a look at this.

Torsten Lilge <ttl>
Group Member
Mon 11 Nov 2013 08:56:05 AM UTC, comment #10: 

Just one small detail/question:

When I close down Octave with a minimized undocked editor pane (i.e., pane not visible), upon restart the pane is restored to its previous undocked position (visible).

Do you know whether this is standard Windows (or even display manager) behavior?


FYI: Matlab (r2012a) on Windows restores all undocked panes to previous screen position, minimized if applicable. The editor behaves special:
- If it is empty ML just closes down an undocked minimized editor pane (i.e. it has to be reopened again through the "edit" command);
- If the editor pane contains anything (AFAICS "anything" is text that has been saved to file or read from file) it is re"created" (minimized if applicable) upon restart.

As far as I'm concerned, if we want to more or less mimic this behavior (= as regards minimized panes) it could go to the wish list for 3.8.1+

Philip Nienhuis <philipnienhuis>
Group Member
Sun 10 Nov 2013 10:18:15 PM UTC, comment #9: 

I will push it tomorrow because I just discovered a small issue with the non-windows build.

Torsten Lilge <ttl>
Group Member
Sun 10 Nov 2013 09:08:11 PM UTC, comment #8: 

Patch also works for me. Neat!

Thanks very much.

Torsten will you push & close report?

Philip Nienhuis <philipnienhuis>
Group Member
Sun 10 Nov 2013 05:24:54 PM UTC, comment #7: 

The attached patch works for, could you please make a test on your windows-system?

(file #29587)

Torsten Lilge <ttl>
Group Member
Fri 08 Nov 2013 11:43:42 AM UTC, comment #6: 

Thanks for the patch.

Unfortunately it doesn't fix the issue.
The editor window still is in the top left position, with title bar almost out of the window border so it is even hard to drag it into another position. See attached .png.
In addition it is now very very small .




Philip Nienhuis <philipnienhuis>
Group Member
Thu 07 Nov 2013 06:45:48 PM UTC, comment #5: 

Yes, I am fairly sure this only affects window systems because floating widgets are unparented and are not automatically restored by restoring state and geometry of the main window as on other systems.

Torsten Lilge <ttl>
Group Member
Thu 07 Nov 2013 06:36:21 PM UTC, comment #4: 

Also, just to be clear, this works on a Linux system (or mine anyways).  So it could be a difference in operating systems, or it could also be a difference in Qt versions.

Rik <rik5>
Group administrator
Thu 07 Nov 2013 06:08:33 PM UTC, comment #3: 

I did not expect a difference but just wanted to make sure the geometry is really stored in the settings file.

Could you please test the attached patch? I can't test it myself because currently I am having trouble with the mxe-build process.

(file #29563)

Torsten Lilge <ttl>
Group Member
Tue 05 Nov 2013 10:43:25 PM UTC, comment #2: 

Doesn't make a difference.

FYI, the FileEditor lines I see after exitingOctave with a floating editor pane somewhere in the middle right of the screen are these:

FileEditor=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x1\xf3\0\0\x1\x8f\0\0\0\0\0\0\0\0\0\0\x1\xf3\0\0\x1\x8f\0\0\0\0\0\0)
FileEditorFloating=true
FileEditorVisible=true
:
:
FileEditor_dock_area=2
:
:
FileEditor_floating_geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x2y\0\0\0u\0\0\x5\xaf\0\0\x3\xb0\0\0\x2}\0\0\0\x8c\0\0\x5\xab\0\0\x3\xac\0\0\0\0\0\0)

And the FileEditor_floating_geometry entry does reappear after closing Octave and removing the entry, and the reappeared one looks like:

FileEditor_floating_geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x1\xfb\0\0\x1\xaa\0\0\0\x4\0\0\0\x17\0\0\x1\xf7\0\0\x1\xa6\0\0\0\0\0\0)


Philip Nienhuis <philipnienhuis>
Group Member
Tue 05 Nov 2013 09:38:48 PM UTC, comment #1: 

Undocked panes should be remembered across a restart; there are extra entries in the settings file for this (e.g. FileEditor_floating_geometry for the editor) because floating panes have no parent on windows. Could you please delete the entry in the settings file and check whether it reappears after octave was closed?

Torsten Lilge <ttl>
Group Member
Tue 05 Nov 2013 08:46:03 PM UTC, original submission:  

(Perhaps as follow-up of bug #38785)
Currently, starting Octave when it had an undocked editor pane in the previous session, the re-opened editor pane initially always ends up in the top left screen corner with some default size (usually too narrow for an .m file).
This happens both after undocking (to be expected after the final fix of bug #38785)) but also after restarting Octave.

I'm sure that remembering positions of undocked panes used to work. Positions of docked panes couldn't be remembered across undocking/docking actions, but is that also true for undocked panes across restarts of Octave?

Philip Nienhuis <philipnienhuis>
Group Member

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #29611:  restore_minimized_01.diff added by ttl (1KiB - text/x-diff)
file #29596:  floating_not_visible_01.diff added by ttl (623B - text/x-diff)
file #29587:  floating_geometry_02.diff added by ttl (5KiB - text/x-diff)
file #29570:  OctEditor1.png added by philipnienhuis (202KiB - image/png)
file #29563:  floating_geometry_01.diff added by ttl (3KiB - text/x-diff)

 

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 group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-11-14 ttl StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2013-11-13 rik5 Carbon-CopyRemoved 72865 -
    2013-11-13 ttl Attached File- Added restore_minimized_01.diff, #29611
    2013-11-11 ttl Attached File- Added floating_not_visible_01.diff, #29596
    2013-11-10 ttl Attached File- Added floating_geometry_02.diff, #29587
        StatusNone Ready For Test
    2013-11-08 philipnienhuis Attached File- Added OctEditor1.png, #29570
    2013-11-07 ttl Attached File- Added floating_geometry_01.diff, #29563

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code