octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave plot window input focus


From: Shai Ayal
Subject: Re: Octave plot window input focus
Date: Thu, 4 Feb 2010 08:07:40 +0200

2010/2/4 Michael D Godfrey <address@hidden>:
> On 01/31/2010 01:21 AM, John W. Eaton wrote:
>
> On 31-Jan-2010, David Grundberg wrote:
>
> | ----- Ursprungsmeddelande -----
> | > I was checking on matlab behavior and noticed that
> | > when a command that creates a plot window is
> | > executed:
> | >
> | > In matlab, the plot window has focus, but keyboard input goes
> | > to the command window without having to switch focus.
> | >
> | > In Octave, the plot window has focus, but keyboard input
> | > does not go to the command window.  Focus has to be switched
> | > to the command window for input.
> | >
> | > This has been true, at least on X11  Linux systems for many years.
> | > But, it has always seemed to me that it would be much better if
> | > input focus stayed with the command window.
> | >
> | > Do people agree that this change would be a good idea (not
> | > just for matlab compatibility)?  And, if so, any ideas where to look in
> the
> | > Octave code to implement the change?
> | >
> | > There are two possible changes:
> | >
> | > 1. Do just like matlab.
> | >
> | > 2. Keep focus with the command window so that it is more obvious that
> | >        the window will accept keyboard input.
> | >
> | > Michael
> | >
> |
> | Just keep it simple and keep the focus where it was. I don't think anyone
> but the user should decide where focus is. I insist - don't copy matlab on
> this.
>
> I also find that applications that move the focus to be very annoying,
> so let's not copy this by default.  If people really want this
> feature, then let's make it configurable and NOT the default.
>
> jwe
>
>
> I tested that set(ghf,"visible","on"); for ghf a figure handle, switches the
> focus to the figure window, both for gnuplot and for fltk.  So, does anyone
> know how to create a new figure window without causing the focus switch.  I
> know
> applications that are able to do this, so...
>
> I also noted that the advice in openGL is not to make direct X11 calls,
> so that is probably not the way to do it.

It's certainly not advisable to make direct X11 calls in octave which
is supposed to run on windows ....

I'm not sure if you can return the focus to the octave window in
general, since the octave process usually does not "own" the windows
in which the command line lives -- this is just some random terminal.
In an IDE (like matlab's), where the terminal & the figure window
belong to the same process, managing these focus switches would be
trivial.

If you run matlab w/o an IDE, from a terminal, will it still switch
focus from the figure to the terminal?

Shai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]