bugGNU Octave - Bugs: bug #37190, Undocked window panes always on...


bug #37190: Undocked window panes always on foreground

Submitted by:  Philip Nienhuis <philipnienhuis>
Submitted on:  Sat Aug 25 15:34:04 2012  
Category: GUISeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Philip NienhuisOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Tue Oct 23 14:24:46 2012, comment #14:

I have pulled and merged Torsten's changes:


Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Tue Oct 23 04:09:51 2012, comment #13:

No, I don't have commit access.

Torsten <ttl>
Project Member
Mon Oct 22 22:10:29 2012, comment #12:

Torsten do you have commmit access?

If not I'll assign the bug report to myself (and attribute the fix to you of course). But first I'd like to test it a bit more.

Philip Nienhuis <philipnienhuis>
Project Member
Mon Oct 22 13:06:29 2012, comment #11:

> I applied the patches by hand, and got:

Philip, one of the advantages of pull requests instead of patches is that hg can help you do this. Just do

to pull Torsten's changes and "hg update bbbb89c" to update your working directory to this revision. You don't need to manually apply these patches. This should help minimise human error when applying the patch by hand.

If you like, you can keep creating commits on top of Torsten's commit, merge the result onto default when you're done and push it to Savannah, or just merge and push right away if you think it's already good as it is.

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Sun Oct 21 17:40:32 2012, comment #10:

OK first results:

- GUI starts up with no editor pane, yet Main Menu "Show Editor" is set. Note: I don't know if the last time I started Octave's GUI I had an editor shown (I always have editors undocked).

- In that state I cannot start an editor by unsetting and setting "Show Editor". I have to unset it, close & restart Octave, and then I can get an editor window by setting "Show Editor".

(Not specifically meant at you, but it is about time that typing "edit" in the command pane starts the Octave editor :-( When I do that now I get emacs.....)

If we consider the above issues as a sort of transit phenomenon between successive Octave versions, I think (AFAICS) that with these patches Octave's GUI has become quite a bit more usable again.

So thank you very much!

Let's keep this open for a few more days until I've done more testing.

Philip Nienhuis <philipnienhuis>
Project Member
Sun Oct 21 17:26:14 2012, comment #9:

Turns out patch for line 442 hadn't been applied. Sincere apologies for the noise and your wasted time.

(Compiling now, I'll let you know test results later tonight or tomorrow)

Philip Nienhuis <philipnienhuis>
Project Member
Sun Oct 21 16:38:09 2012, comment #8:

in reply to comment #6

Philip, could you please check your file main-window.cc again (especially new lines 404-406 and 440-442)?

Torsten <ttl>
Project Member
Sat Oct 20 23:09:12 2012, comment #7:

I am wondering why 'class Qwidget' is written in the error message. The if-statement in the loop over all children of the main window now only selects objects that inherit from QDockWidgets. The following cast converts these objects into QDockWidget, not QWidget.

Torsten <ttl>
Project Member
Sat Oct 20 21:33:41 2012, comment #6:

Thanks Torsten!

I applied the patches by hand, and got:

Checked the patched files again, couldn't spot wrongly applied lines.
Grepping for "isFloating" gave no hits.

FYI I have qt4 4.8.2, Mageia Linux 2

Philip Nienhuis <philipnienhuis>
Project Member
Sat Oct 20 16:16:13 2012, comment #5:

I created a new patch at

All dock widgets are now changed into normal windows when floating. The floating-/visible-state of each widget is saved in the settings in order to recover the right state at startup.
The patch does not have the side effects reported by Philip (at least on my system).

Torsten <ttl>
Project Member
Sat Oct 13 23:27:15 2012, comment #4:

On ubuntu 12.04, I can confirm 2 ("Show editor" is always set) but I am not able to confirm 1 or 3 so I will have a look at issue 2 first.

Torsten <ttl>
Project Member
Sat Oct 13 11:25:43 2012, comment #3:

After playing around a bit further, this patch turns out to have undesirable side effects. (tested on Mageia-2 Linux)

1.A. With "Preferences"|"Editor"-> "Restore tabs from previous session on startup" SET, editor windows can be opened if one wasn't shown.
1.B. With "Preferences"|"Editor"-> "Restore tabs from previous session on startup" UNSET, there's no way I can open an edit window if there wasn't one open.

2. (Main menu bar) Upon startup, "Window"| "Show Editor" is always SET, whether there was an editor window opened while previously closing Octave or not. Before the patch this setting worked OK.

3. If there was no edit window open during last Octave shutdown, an edit window briefly flashes by during the next start of Octave. This does not bother me, but I don't know if this has possible side effects of hanging Octave if a file edited in the previous Octave setting doesn't exist anymore or so.
It would be better if the edit window isn't launched at all.
I suppose this is related to issue 2. above.

Philip Nienhuis <philipnienhuis>
Project Member
Thu Oct 11 20:44:15 2012, comment #2:

Thanks for this patch, works good.

IMO this should be done for all dock widgets. AFAICS Matlab works similarly (not an endorsement by itself for this patch but it's good to know).

Philip Nienhuis <philipnienhuis>
Project Member
Thu Oct 11 18:04:37 2012, comment #1:

Possible solution: The editor dock widget is changed into a normal window when it is floating. This enables Alt-Tab between gui and editor and the editor window has its own icon.
I created a patch at

Should this be implemented for all dock widgets?

Torsten <ttl>
Project Member
Sat Aug 25 15:34:04 2012, original submission:

(Couldn't find earlier post on this, sorry if duplicate)

The GUI is always in the background compared to undocked GUI panes. On small screens (laptop) I find this annoying, especially w.r.t. the editor as that has always to be shifted out of the way or resized before I can see Octave output on the command window. Based on Matlab experience, I think that many users would like to be able to simultaneously view the full command window and editor panes.

ML can have its editor (and IIRC other window panes as well) moved to the background using Alt-Tab. It would be great if the Octave GUI could do the same.
Or is this a Qt limitation?

Philip Nienhuis <philipnienhuis>
Project Member


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

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Oct 23 14:24:46 2012jordighStatusPatch Submitted=>Fixed
    Thu Oct 11 18:12:16 2012jordighStatusNone=>Patch Submitted

    Back to the top

    Powered by Savane 3.1-cleanup