Wed 20 Dec 2017 06:59:10 PM UTC, comment #5:
The patch works for me for what I wanted.
I don't really care if the figure gains focus when clicking on the title bar, etc. Actually, I think I like that there is a way to rearrange figures manually without changing which has focus for the next plotting commands. I've had to do very careful use of passing axis/figure/plot handles to each plotting/animation function to avoid plotting in the wrong windows/axes, especially when doing long animations: I don't like the animation jumping to another axis (and overwriting that plot) when all I want is to rearrange windows to see more things at once, or to move things to better positions.
For example:
The second figure will block the first one, which has an animation running on it, but I want to move the second to watch it. Moving and resizing it shouldn't change the focus. But click on the axis of figure(2), and now it will begin the animation there. Rather annoying actually, especially if figure(2) had taken a while to process and draw that data. Stray clicks can ruin good plots.
For what it's worth the following avoids the problem, but it takes more lines of code and I don't always write it this way the first time through a script/function, and don't do it this way until drawing in the wrong axis has bitten me too many times or too hard, or if I need faster animations.
I note that 4.2.1 doesn't have this problem at all with this test. In matlab this problem presents itself in almost the same way except that in the above, figure(1) brings the figure window to the front (octave doesn't), so there is less temptation to rearrange windows in this example. In Matlab I can't even move the windows without changing the focus and starting the animation running on the other figure, which would be the result if full figure focus was taken by clicking on titlebar or decorations. I'd accept if the behavior was implemented because matlab does it that way and I already have workarounds (from when I worked a lot in matlab), but I don't prefer that behavior.
|
Tue 19 Dec 2017 09:24:52 PM UTC, comment #2:
Confirmed.
I changed the bug summary to reflect the true problem which is that clicking on a figure window does not make it the current figure.
For the Qt and fltk toolkits you must click within the Canvas (axes) area of the figure in order to make the figure current. Clicking in the menu area, or on the window decorations is not enough.
This behavior is present in 4.2.1, but doesn't cause an issue there.
|
Tue 19 Dec 2017 08:58:04 PM UTC, original submission:
In the new development version, only the current figure window is closed even though the close button is pressed on a different figure.
To reproduce, open several figure windows, drag them so you can see any but the top one.
Press the x on figure 3 to close it. Figure 4 will close. call figure(2), then press the x on figure 3, and figure 2 will close. Press the x on figure 1, figure 3 will close.
|