Subject: FVWM: how to avoid passing mouse clicks to windows

From: Mike McNally <[email-masked]>
Date: Mon, 16 Jun 2003 13:51:40 -0500

I'd like to bind a mouse button (with modifiers) to a command,
and I'd like for the click to not be passed to the application
when the click happens over a window. Is this possible? If so,
I suspect it's in the documentation somewhere, but I so far have
not found it.

--
[ you are my main foo ] Mike McNally -- [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: Dominik Vogt <[email-masked]>
Date: Tue, 17 Jun 2003 10:34:37 +0200

> I suspect it's in the documentation somewhere, but I so far have

Currently, the click is always passed to the application for
bindings using the 'W'indow context:

  Mouse 1 W S echo passed to application

However, bindings to the 'A'ny context are not passed:

  Mouse 1 A S echo not passed to application

Bye

Dominik ^_^  ^_^

---

From: Mike McNally <[email-masked]>
Date: Tue, 17 Jun 2003 07:28:18 -0500

>   Mouse 1 A S echo not passed to application

That does not appear to be true (in 2.4.16 at least); there's
no difference in behavior when I define the mapping with "A"
context as opposed to (for example) WSIF.  The click is always
passed through.

---

From: Mike McNally <[email-masked]>
Date: Tue, 17 Jun 2003 12:00:30 -0500

>   Mouse 1 A S echo not passed to application

The code in "event.c" that makes this decision is (as far as I
can tell) not sensitive to the way that the mouse binding was
configured; it only cares about the actual context of the button
event.

A minor hack to that code to disable click passing when the bound
event is in the window context seems to work just fine for me,
though I'm sure I'm committing some great evil by having it work
that way. (If I knew how I'd hack in a real Style option and do
it that way.)

---

From: Jon Haugsand <[email-masked]>
Date: Wed, 18 Jun 2003 10:17:08 +0200

* Mike McNally
> context as opposed to (for example) WSIF.  The click is always

It is certainly true in 2.4.14.  Are you sure you haven't got any
conflicting setups in your .fvwm2rc file?

-- 
 Jon Haugsand, [email-masked]
 http://www.norges-bank.no

---

From: Mike McNally <[email-masked]>
Date: Wed, 18 Jun 2003 07:13:39 -0500

> conflicting setups in your .fvwm2rc file?

Yes, I'm quite sure, and I'm fairly sure as well that I found the
(very simple) code responsible.   Whether button events are passed
to windows is dependant on whether the window context of the event
is "W" (or no context), but not on how the binding was defined.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 18 Jun 2003 16:05:15 +0200

On Wed, Jun 18, 2003 at 07:13:39AM -0500, Mike McNally wrote:
> is "W" (or no context),

... and the context isn't 'W' if the root window swallows it.  I
think that's what happens in 2.5.7, which I was talking about.

> but not on how the binding was defined.

Bye

Dominik ^_^  ^_^

---

From: Mike McNally <[email-masked]>
Date: Wed, 18 Jun 2003 09:08:35 -0500

> .... and the context isn't 'W' if the root window swallows it.  I

Umm ... OK.  I'm not sure I see what the root window has to do with
it, as my concern is only about application windows.  But thanks;
maybe I should look into running 2.5.x for a while.