[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave plot window input focus
From: |
Ben Abbott |
Subject: |
Re: Octave plot window input focus |
Date: |
Thu, 04 Feb 2010 20:45:43 -0500 |
On Feb 4, 2010, at 6:42 PM, Michael Godfrey wrote:
> On 02/04/2010 12:20 PM, John W. Eaton wrote:
>> On 4-Feb-2010, Michael Godfrey wrote:
>>
>> | On 02/03/2010 10:22 PM, Michael D Godfrey wrote:
>> | > On 02/03/2010 10:07 PM, Shai Ayal wrote:
>> | >> 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
>> | >>
>> | > I tried matlab -nodesktop. Focus goes to plot window. Ugh.
>> | >
>> | > Michael
>> | >
>> | The best I can think of now is a separate X11 program which monitors
>> | events on the
>> | command window and grabs focus back whenever it is moved by a window create
>> | event. It may be a bit tricky to distinguish intended moves (by mouse
>> | click for example).
>> | This program could be (optionally) started when octave is started in an
>> | X11 environment.
>> |
>> | Any better ideas?
>>
>> I think this focus thing is a function of the window manager, at least
>> unless the application overrides the window manager choice.
>>
>> For example, I'm using Metacity on a Debian system and by default it
>> appears to give the focus to newly opened windows. But I found that
>> changing the "focus_new_windows" parameter from "smart" to "strict"
>> causes it to not give the focus to new windows automatically. To
>> change this setting, I had to run gconf-editor, select
>> apps->metacity->general and then changne the "focus_new_windows"
>> option.
>>
>> This change solves my problem with Octave and a new gnuplot or fltk
>> window grabbing the focus from my command window.
>>
>> jwe
>>
>>
> Very good! It turns out that metacity is at the bottom of fedora/X11/... It
> is used
> for gnome and, I think, KDM. In any case running gconf-editor and following
> your
> instructions works for fedora too.
>
> Finally, this is solved!
>
> This might usefully go somewhere in the documentation, even maybe in the
> Manual.
>
> Michael
>
For reference, if I understand correctly, the x11 gnuplot terminal under MacOS
X behaves according to the "strict" parameter.
Ben