Subject: FVWM: Want focus and active pointer in new windows, especially transients

From: Lars Eighner <[email-masked]>
Date: 16 Jan 2001 09:22:12 -0600

I am running 2.3.20, which is the latest version that is ported to FreeBSD.

I want dialogue windows (or any new windows) to get focus and to have an
active pointer in them.  In particular, I want to do this with WordPerfect
so that tab between dialogue buttons and fields without using the mouse.
I don't know how cooperative WordPerfect 8 is with X, but so far I can't
get things to work right with native X applications - so that is my first
goal.

I have tried the examples in the FAQ with no success.  The closest
I have got so far is to get new windows colored like they have focus
and raised, but the pointer doesn't go to the window and if it happens
to be where the window opens, it is in cross-hair form and for example
with xterm I can't type into the window (the little block after the
prompt is in outline form, like the window doesn't have focus, although
it is in the hilight colors).

I gather that I am supposed to do this with FvwmEvent, add_window and
some function defined to do what I want.  But so far, defining that
function with various combinations of Focus, FlipFocus, Raise, and
WarpToWindow has not come up with what I am looking for.  I think I
was able to do this at one time with hints for mouseless operation for
the disabled.  But I lost my configuration with a crash and have been
unable to find the site with that information again.

Can someone tell me very slowly and clearly, like I am as senile as I,
exactly what I have to do?

-- 
  Lars Eighner           [email-masked]           http://www.io.com/~eighner/
     Someday you will look back on this moment and plow into a parked car.

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 16 Jan 2001 11:40:26 -0600

> I am running 2.3.20, which is the latest version that is ported to FreeBSD.

2.3.20 was in July, the current version is pre-2.3.28.

There are many people, every one with his own wishes about focus policy,
placement policy, usage of keyboard or mouse, circulating policy, window
states like maximizing, iconifying, shading, borders, buttons, bindings
and so on. FVWM lets you to customize most of things, but you should be
ready learn it, it is not hard if you are a unix person.

The best way to learn fvwm commands is to open FvwmConsole and try all
commands that you want (or find in the man page). Try first the simple
ones like Move, Maximize, Exec xterm, Restart. Many commands need a window
context, they are best to be tested with Next or All, like:

  Next (XTerm) Focus
  Next (XTerm) WarpToWindow 50 8p
  All (!FvwmConsole) Iconify

You will find that Focus does not warp the mouse pointer to a window,
i.e. you may type into a newly focused window despite the fact that the
pointer is actually over some other window.
Once you learn how individual commands work, you may create complex
functions consisting from individual commands, say:

  DestroyFunc SelectWindow
  AddToFunc   SelectWindow
  + I Echo Selected window: id=$w, name="$n"
  + I Iconify false
  + I WindowShade false
  + I Focus
  + I WarpToWindow

  Key Tab  A  CM   Prev SelectWindow
  Key Tab  A  SCM  Next SelectWindow

> it is in the hilight colors).

The cross-hair cursor is used when the window is requered for a window
operation like Iconify, Move, Focus, but there is no window context.
This happens if you use FvwmEvent without PassId. I.e. your function
defined as add_window hook is called without a window context, thus
all window commands, like Focus will first require you to choose
a window and press a button or Enter. Hovewer if you use PassId, and
then WindowId $0 WarpToWindow, this will work on a newly added window.

The example in FAQ lists 2.3.19+ as requirement, but it should be 2.3.21+,
sorry for the mistake. If you already use a developement version, I would
suggest to update to 2.3.27 anyway.

> exactly what I have to do?

This is from FAQ, but edited to work with any 2.3.x (but not 2.2, because
it does not support PassId). Put this to your .fvwm2rc:

#
# Every new window is focused and gets a mouse cursor
#
*FvwmEventCmd
*FvwmEventPassId
*FvwmEvent add_window SelectWindow

AddToFunc StartFunction I FvwmEvent

DestroyFunc SelectWindow
AddToFunc   SelectWindow
+ I WindowId $0 Focus
+ I WindowId $0 WarpToWindow 50 50

Regards,
Mikhael.

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 16 Jan 2001 18:00:53 -0600

On 17 Jan 2001 00:09:22 +0100, Andre Bonhote wrote:
> Mikhael Goikhman wrote:
> THIS IS IT! mikhael, thanks! bof! i dont think there is any window
> manager around to be this configurable.
> 
> i know, i didnt really point out what i was looking for in my posting. i
> actually just wanted to say "i agree" to lars.
> 
> what you said about the faq-version: i mean, why the differences between
> the versions? i am currently using 2.3.26 with ReadLine, RPlay, XPM,
> GNOME WM hints, SM (whatever this is). faq says this:
> 
>      *FvwmEvent-NewWindow: Cmd
>      *FvwmEvent-NewWindow: PassId
>      *FvwmEvent-NewWindow: add_window FuncFocusWindow
> 
>      DestroyFunc FuncFocusWindow
>      AddToFunc   FuncFocusWindow
> #    + I WindowId $0 ("My Window") Move 200p 100p
>      + I WindowId $0 Focus
>      + I WindowId $0 WarpToWindow
> 
>      AddToFunc StartFunction I FvwmEvent FvwmEvent-NewWindow
> 
> this doesnt work with me. no backwards compatibility? the man-page of
> fvwmevent shows the syntax you're using, and this works.
> 
> well, i won't brush my brain too much. it's late :) thanks for the great
> hint anyways!

No, please brush your brain a little more. As you see these are actually
the same examples. The syntax colon-space was introduced in 2.3.21 only.
But it should work with 2.3.26 or the current pre-2.3.28. I myself prefer
to use module aliases (the example that is in the FAQ), because this way
I can start and stop independently several FvwmEvent instances, say one
for sound events and one to catch new windows. Module aliases are poorly
documented in the fvwm man page in the "MODULE COMMANDS" section.

So, please put the example from FAQ without leading spaces and restart.
It should work, send me your full config if it does not work for you.
If you have any ModulePath command, remove it, this only breaks things.

Regards,
Mikhael.

---

From: Glen Lee Edwards <[email-masked]>
Date: Tue, 16 Jan 2001 23:41:33 -0600 (CST)

I'm using Fvwm 2.2.4 (the stock version that came with RH Linux 7.0), and
currently have 4 panels set up in .fvwm2rc.  I've tried to add in a 5th panel,
but every time I do FvwmButtons won't load when I restart X.  Is there a limit
to 4 panels, or am I doing something wrong?

Glen

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 17 Jan 2001 11:07:52 +0100

> to 4 panels, or am I doing something wrong?

No, there is no limit.  You should watch the console messages of
FvwmButtons.  Probably you will find the reason there.  If not,
look for a core file and send us a stack trace if possible.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: "Thomas A. Gardiner" <[email-masked]>
Date: Wed, 17 Jan 2001 07:59:43 -0500 (EST)

Hi, I'm not sure what you mean by panels.  Below Dominik suggested you
look at the console output; for a RH setup I think you want to take a look
at the file ~/.FVWM2-errors which is where all of the error output is
redirected.

I think maybe you should explain just what you are doing rather than our
guessing.  Then maybe we can help you.

(Sorry, I just noticed that I'm assuming that you are using redhat's setup
for fvwm2.  Are you?)

Tom

---

From: Glen Lee Edwards <[email-masked]>
Date: Wed, 17 Jan 2001 08:44:29 -0600 (CST)

Today, at 07:59, Thomas A. Gardiner sent through the Star Gate:

>Hi, I'm not sure what you mean by panels.  

Does this help?  It's from my .fvwm2rc file (but not wrapped):

## Top row of buttons
*FvwmButtons(1x1+0+0, Frame 4, Title "System Menu",  Icon menu.xpm,  Action Menu
RootMenu)
*FvwmButtons(1x1+1+0, Frame 4, Title "Web Browsers", Icon netscape.xpm, Panel
Netscape)
*FvwmButtons(1x1+2+0, Frame 4, Title Xemacs, Icon xemacs.xpm, Panel Xemacs)
*FvwmButtons(1x1+3+0, Frame 4, Title Network, Icon network.xpm, Panel Network)
*FvwmButtons(1x1+4+0, Frame 4, Title "Misc Programs", Icon misc.xpm, Panel MiscP
*FvwmButtons(1x1+5+0, Frame 4, Title Tools, Icon toolbox.xpm, Panel Tools)

When I add in the "Misc Programs" Panel as the last one (even though it's not
last in how it's displayed on the buttons), no matter what I name it FvwmButtons
won't load.  Here is the actual test Panel conf (copied from one that works):

## Panel Misc Programs
*FvwmButtonsPanel MiscP
*FvwmButtonsBack bisque2

*FvwmButtons(Frame 2 Padding 2 2 Container(Rows 2 Columns 5 Frame 1 Padding 10
0))
*FvwmButtons(1x1+0+0, Title Resize,Icon jresize.xpm,   Action Resize)
*FvwmButtons(1x1+1+0, Title Move,  Icon arrows2.xpm,  Action Move  )
*FvwmButtons(1x1+2+0, Title Lower, Icon down.xpm,     Action Lower )
*FvwmButtons(1x1+3+0, Title Raise, Icon up.xpm,       Action Raise FlipFocus)
*FvwmButtons(1x1+4+0, Title Iconize, Icon icon.xpm, Action Iconify)
*FvwmButtons(1x1+0+1, Title Maximize, Icon maximize.xpm, Action Maximize)
*FvwmButtons(1x1+1+1, Title Delete, Icon delete.xpm, Action Delete)
*FvwmButtons(1x1+2+1, Title Destroy, Icon bomb.xpm, Action Destroy)
*FvwmButtons(1x1+3+1, Title Previous, Icon prev.xpm, Action Prev Prev Prev
FlipFocus)
*FvwmButtons(1x1+4+1, Title Exit, Icon exit.xpm, Action Quit)
*FvwmButtons(End)

>Below Dominik suggested you

No such beasty.  I found this .AfterStep-errors file, but it's dated Jan 17,
2000.  However, I didn't own this box then, and it was running Win98 at the
time, so it might be what you're referring to.

Detected colordepth : 16
is folder (64,384)
'afterstepdoc' at (0,0,64,64)
'asclock' at (0,64,64,64)
'Applications' at (0,128,64,64)
 is folder (128,64)
 'xiterm' at (64,0,64,64)
 'Helpme' at (0,0,64,64)
  is folder (64,64)
  'xman' at (0,0,64,64)
'xlock' at (0,192,64,64)
'xeyes' at (0,256,64,64)
'QuitForm' at (0,320,64,64)
X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
  Major opcode of failed request:  62 (X_CopyArea)
  Resource id in failed request:  0x1400010
  Serial number of failed request:  665
  Current serial number in output stream:  668

>guessing.  Then maybe we can help you.

I'm trying to add in several topic specific panels from the FvwmButtons bar.  It
works with 4 or less panels; I click on one of them, the panel pops up, I click
on the button I want, and we're off!  But when I add in the 5th panel none of
the buttons appear when I restart X.

>(Sorry, I just noticed that I'm assuming that you are using redhat's setup

Yes, just as it came from the CD, with some ~/.fvwm2rc modifications.

Glen

---

From: Glen Lee Edwards <[email-masked]>
Date: Wed, 17 Jan 2001 10:20:14 -0600 (CST)

>look for a core file and send us a stack trace if possible.

$ gdb FvwmButtons core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...FvwmButtons: No such file or
directory.

Core was generated by `/usr/X11R6/lib/X11/fvwm2/FvwmButtons 7 4 .fvwm2rc 0 8'.
Program terminated with signal 11, Segmentation fault.
#0  0x401a6588 in ?? ()
(gdb) where
#0  0x401a6588 in ?? ()
#1  0x80517e8 in ?? ()
#2  0x8051af5 in ?? ()
#3  0x804a9c2 in ?? ()
#4  0x4014a790 in ?? ()
(gdb) 

Hope this is what you're looking for.

Glen

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 17 Jan 2001 20:09:52 +0100

> Hope this is what you're looking for.

In theory yes, but unfortunately your FvwmButtons has been
stripped of all debug information.  Could you download the 2.2.4
sources from fvwm.org and built the FvwmButtons executable
manually and try this again?  You should get a proper cor dump.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Glen Lee Edwards <[email-masked]>
Date: Wed, 17 Jan 2001 16:37:22 -0600 (CST)

Are any of you using 2.3.27 with RH7?  I'm thinking about giving it a shot, and
would like your comments.

Thanks!

Glen

---

From: Kendrick Vargas <[email-masked]>
Date: Wed, 17 Jan 2001 19:21:32 -0500 (EST)

On Wed, 17 Jan 2001, Glen Lee Edwards wrote:

> Are any of you using 2.3.27 with RH7?  I'm thinking about giving it a
> shot, and would like your comments.

yeah, it's one of the few things that DOES work with RH7 :-)
			-peace

--- BEGIN GEEK CODE BLOCK ----------+----------
GAT d- s:+ !a C++$ UL/S/I/B++++$ P+ | "In the ongoing battle between objects
L++ E- W+(+++) N K-  w(---)  O-- M@ |  made of aluminum  going hundreds of
V(--) PS+++  PE Y+ PGP@ t++ 5 X+ R- |  miles per hour and the ground going
tv+ b- DI++++  D+(+++) G  e>++ h--- |  zero,  the  ground has yet  to lose."
r++ z+>+++ - END GEEK CODE BLOCK ---+

---

From: Mikhael Goikhman <[email-masked]>
Date: Wed, 17 Jan 2001 19:53:24 -0600

> would like your comments.

If you decide to use a beta, you should first go to RH7 Updates and
upgrade glibc to glibc-2.2 or greater, this is needed anyway for RH7.

You may either compile yourself, or get fvwm-2.3.27 rpm for RH6, which may
work for other distributions as well.

The way our rpms are created is that they do not conflict with RH or SuSE
fvwm2-2.2.4 rpm, so you may have both and switch between /usr/X11/bin/fvwm2
(2.2.4) and /usr/bin/fvwm2 (2.3.27). Remove ModulePath if you have any.

If you have problems, it is wise to stay with the stable version, or to
help with beta by investigating and reporting problems to fvwm-workers@.

Regards,
Mikhael.