Subject: Notification: incoming/293

From: [email-masked]
Date: Fri, 9 Apr 1999 11:06:17 -0500 (CDT)

FVWM Bug Tracking notification

new message incoming/293

Message summary for PR#293
	From: [email-masked]
	Subject: feature wish: automatically focus transient windows in MouseFocus mode
	Date: Fri, 9 Apr 1999 11:06:16 -0500 (CDT)
	0 replies 	0 followups

====> ORIGINAL MESSAGE FOLLOWS <====

---

From: Matthias Clasen <[email-masked]>
Date: Sun, 11 Apr 1999 23:36:29 +0200

> 
> 
> WIBNI there was an option to fvwm which told it to automatically focus
> transient
> windows when they are mapped (or created, dunno about the right
> terminology)?
> 
> This allows people who use MouseFocus or SloppyFocus to just type Alt-F in
> Netscape, say, and immediately continue to enter the string to search for,
> 
> rather than having to use the mouse to focus the transient window.
> 
> This feature was implemented in ctwm 3.5.2, and I have found it to be
> sufficient,
> but a potential improvement might be to focus the new transient window
> only
> if it is a transient_for the window which currently has focus.
> 

Most of this is already implemented (GrabFocus style option).

With GrabFocus, it is possible to have a newly mapped transient
grab the focus with the cursor staying over the parent. Unfortunately,
the focus isn't reverted back to the parent (which I would expect with
Style * SloppyFocus) when the transient is unmapped with the pointer still
over the parent. 

I have fixed this by doing a CoerceEnterNotifyOnCurrentWindow
in HandleUnmapNotify if the window being unmapped has the focus
and uses GrabFocus. It seems to work, but perhaps the implementor
of GrabFocus (Dominik ?) should have a look at this.

Btw what is the recommended way to apply GrabFocus to all transients ?
There seems no easy way to do something like this: Have the main netscape
window use GrabFocusOff, but have all transients use GrabFocus ?

Style Netscape* GrabFocusOff
Style "Netscape: Find" GrabFocus
Style "Netscape: Print" GrabFocus
Style "Netscape: Preferences" GrabFocus
...

feels unpleasantly low-tech (how many transients does netscape have ?!)

Perhaps we need something like a GrabFocusTransient style option
(analogous to DecorateTransient). It might even be nicer to extend
the syntax of the Style command to allow

Style "Netscape*" GrabFocusOff
Style ("Netscape*" Transient) GrabFocus

Currently Transient seems to be the only condition which makes sense
for a style command, but we add window group support some day, it may
also make sense to apply a different style to group leaders. Note
that this syntax would also make the DecorateTransient style option
unnecessary.

-- 
Matthias Clasen, 
Tel. 0761/203-5606
Email: [email-masked]
Mathematisches Institut, Albert-Ludwigs-Universitaet Freiburg
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 12 Apr 1999 01:05:03 +0200

> Btw what is the recommended way to apply GrabFocus to all transients ?

To use the GrabFocusTransient style I'll implement in a minute, now that
we have plenty of room for new style flags :)

> Perhaps we need something like a GrabFocusTransient style option

Ah, we're thinking alike.

> Style ("Netscape*" Transient) GrabFocus

That would require about a thousand changes. I don't think there is
an easy way to do this.

> that this syntax would also make the DecorateTransient style option

To do this we need a sound plan that minimizes the changes and
prevents code bloat at the same time. Any ideas?

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-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Matthias Clasen <[email-masked]>
Date: Mon, 12 Apr 1999 16:37:35 +0200

> prevents code bloat at the same time. Any ideas?

No, and since we now have GrabFocusTransient, I'd say we leave this
until 2.4 or whenever I'll get back to window group stuff. I'll file 
an extension request to keep track of the idea.

Matthias