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 25 Aug 2012 03:34:04 PM UTC  
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Philip Nienhuis Open/Closed:  Closed
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


( Jump to the original submission)

Tue 23 Oct 2012 02:24:46 PM UTC, comment #14: 

I have pulled and merged Torsten's changes:


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

No, I don't have commit access.

Torsten Lilge <ttl>
Project Member
Mon 22 Oct 2012 10:10:29 PM UTC, 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 22 Oct 2012 01:06:29 PM UTC, 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

hg pull https://bitbucket.org/ttl/octave-ttl/changeset/bbbb89c

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 21 Oct 2012 05:40:32 PM UTC, 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 21 Oct 2012 05:26:14 PM UTC, 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 21 Oct 2012 04:38:09 PM UTC, 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 Lilge <ttl>
Project Member
Sat 20 Oct 2012 11:09:12 PM UTC, 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 Lilge <ttl>
Project Member
Sat 20 Oct 2012 09:33:41 PM UTC, comment #6: 

Thanks Torsten!

I applied the patches by hand, and got:

../../octave/libgui/src/main-window.cc: In member function 'void main_window::write_settings()':
../../octave/libgui/src/main-window.cc:444:35: error: 'class QWidget' has no member named 'isFloating'
../../octave/libgui/qterminal/libqterminal/unix/CharacterColor.h: At global scope:
../../octave/libgui/qterminal/libqterminal/unix/CharacterColor.h:102:25: warning: 'base_color_table' defined but not used [-Wunused-variable]
make[3]: *** [src/src_libgui_src_la-main-window.lo] Error 1
make[3]: Leaving directory `/home/philip/devel/oct370+/libgui'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/philip/devel/oct370+/libgui'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/philip/devel/oct370+'
make: *** [all] Error 2
[philip@jvc741 oct370+]$

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 20 Oct 2012 04:16:13 PM UTC, 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 Lilge <ttl>
Project Member
Sat 13 Oct 2012 11:27:15 PM UTC, 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 Lilge <ttl>
Project Member
Sat 13 Oct 2012 11:25:43 AM UTC, 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 11 Oct 2012 08:44:15 PM UTC, 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 11 Oct 2012 06:04:37 PM UTC, 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 Lilge <ttl>
Project Member
Sat 25 Aug 2012 03:34:04 PM UTC, 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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only project members can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-10-23 jordigh StatusPatch Submitted => Fixed
        Open/ClosedOpen => Closed
    2012-10-11 jordigh StatusNone => Patch Submitted

    Back to the top

    Powered by Savane 3.6