Re: FVWM: FvwmEvent and focusing on Netscape popups

From: Dominik Vogt <dominik_vogt_at_hp.com>
Date: Fri, 8 Jan 1999 10:22:17 +0100

On Thu, Jan 07, 1999 at 10:04:56PM -0800, duvall_at_emufarm.ml.org wrote:
> Here's what I want to do. Whenever a popup window appears in Netscape (say
> I pressed M-l or M-f or it's asking me if I really want to submit the
> form), I want the keyboard focus to go to the popup. When the popup
> disappears, I want the focus to return to whatever window it was in before
> (though I'd settle for a Netscape window, as long as it was the one I came
> from).
>
> As far as I can tell, the tool to use here is FvwmEvent. What I've gotten
> is the following.
>
> AddToFunc FocusIfTransient "I" Next (*_popup) Focus
>
> *FvwmEventCmd FocusIfTransient
> *FvwmEvent add_window FocusIfTransient
>
> This works just fine. The popup appears, and it immediately gets focus.
> However, when it disappears, although the mouse pointer is still in the
> Netscape window (I use focus follows mouse), it doesn't get the focus (no
> window does, as far as I can tell) unless the pointer was inside the popup
> to begin with (a situation in which all this rigmarole is unnecessary).
>
> I can't for the life of me, though, figure out how to do the second half
> here. I've tried putting in the appropriate FvwmEvent stuff:
>
> *FvwmEventCmd UnFocusIfTransient
> *FvwmEvent destroy_window UnFocusIfTransient
>
> But I can't figure out what to put in UnFocusIfTransient, particularly so
> that it doesn't get called on *every* window destroy.
>
> So -- is there a way to do it without making any modifications? Also, is
> it a bug that focus does not return to the original window on its own?

I think the problem is that no event is triggered when you
destroy a window, even the one with the focus. In general it
is correct that no window receives the focus when the one
that had it is destroyed. The focus is given to a new window
only when you enter a new window with the pointer (with
SloppyFocus and Mouse Focus). This generates an EnterNotify
event that takes care of the focus.

> Please cc: me on any responses, as I'm not subscribed to this list.

Bye

Dominik

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, dominik_vogt_at_hp.com
--
Visit the official FVWM web page at <URL: http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Jan 08 1999 - 03:24:19 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST