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: Michael Godfrey
Subject: Re: Octave plot window input focus
Date: Thu, 4 Feb 2010 15:42:02 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.7) Gecko/20100120 Fedora/3.0.1-1.fc12 Thunderbird/3.0.1

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


reply via email to

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