Subject: Re: FVWM: ClickToFocus feature wish or question

From: Kai Grossjohann <[email-masked]>
Date: 22 Nov 1996 14:02:38 +0100

>>>>> lar3ry gensch writes:

>>>>> Kai Grossjohann wrote:

  Kai> The first click in a window does two things:

  Kai> (1) it gives the window focus
  Kai> (2) it is passed on to the application

  Kai> How do I turn off (2)?  I don't want my Emacs to do strange
  Kai> things just because I click in it to give it focus!

  lar3ry> The Motif Window Manager has the properties passButtons and
  lar3ry> passSelectButton to enable/disable this feature.  It seems
  lar3ry> to me like fvwm should have a similar Style or keyword.

Sorry for taking so long to answer.  AFAIK, mwm has a property that
generally sez something about whether or not clicks should be passed
on to applications.  I was talking about the *first*, focus-giving,
click only.  All other clicks should be passed on.  Otherwise, I
suppose I could just put some binding for mouse1 in W context in the
config file and everything would be set.

Any ideas?
kai
-- 
I wonder why nobody don't like me,
or is it de fact dat I'm ugly? -- Harry Belafonte
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: "Charles Hines" <[email-masked]>
Date: Fri, 22 Nov 1996 09:19:32 -0500

>>>>> "Kai" == Kai Grossjohann <[email-masked]> writes:

Kai> Sorry for taking so long to answer.  AFAIK, mwm has a property that
Kai> generally sez something about whether or not clicks should be passed
Kai> on to applications.  I was talking about the *first*, focus-giving,
Kai> click only.  All other clicks should be passed on.  Otherwise, I
Kai> suppose I could just put some binding for mouse1 in W context in the
Kai> config file and everything would be set.

Kai> Any ideas?

Yeah:

  1) I'm planning to add this as a global option in in 2.0.44
     (ClickToFocusDoesntPassClick or something like that)
  2) In events.c, in HandleButtonPress look for:
     #if 1 /* pass click event to just clicked to focus window */
     and just change that to an '#if 0' instead.

These notes must have been among those I lost over the weekend or I
would have responed sooner...

Chuck

---

From: lar3ry gensch <[email-masked]>
Date: Fri, 22 Nov 1996 10:03:08 -0500

>      and just change that to an '#if 0' instead.

First, I'd like to use the term "DontPassClick" as a less wordy version
of ClickToFocusDoesntPassClick.  At least, it will save on typing in
this reply!

I've actually made the change you suggest in (2) a while ago, and the
problem that I had found immediately with this is that I have a few
applications that are StaysOnTop (button bar, pager, tkgoodstuff)... 
since they are never obscured (especially now with the new
CleverPlacement code!), I'd like to keep the old behavior of just
clicking on a button and having the selected task operated on
immediately.  If DontPassClick is global, then such actions require TWO
button presses.  Yeeeccccch!  After witnessing that behavior, I
re-enabled the PassClick (the opposite of DontPassClick) behavior.

Then, I started thinking of Style flags.

How about:

	Style "*"		DontPassClick
	Style "Fvwm Pager"	PassClick
	Style "FvwmButtons"	PassClick
	Style "tkgoodstuff"	PassClick

This would allow me to have the behavior that I would prefer.  Of
course, we are awaiting the Great Style Flag Rewrite, and adding new
styles is more difficult than adding a global option, so I have up to
now held my tongue on that suggestion.  (As a nit, maybe
PassClick/NoPassClick would be more in keeping with the current style
flag naming conventions.)

Anyway, I still needed a solution, so I came up with a workaround that
requires NO changes to the existing code:

Define a Key-Mouse combination that will perform the focus and raise.

Here's the relevant part of my .fvwm2rc file:

# RaiseAndFocus -- REALLY Raise an application and focus on it:

AddToFunc	"RaiseAndFocus"
+	"I"	Iconify -1
+	"I"	Raise
+	"I"	Focus

# Meta-Button 1, 2, or 3 is Raise and Focus

Mouse	1	WTFSI	M	RaiseAndFocus
Mouse	2	WTFSI	M	RaiseAndFocus
Mouse	3	WTFSI	M	RaiseAndFocus

Then, all I had to do is get into the habit of using Meta-Button to
raise a desired application (which is pretty easy, actually).

The only downside to this solution is that it steals META-Button{1,2,3}
from applications.  But since this is .fvwm2rc that we are talking
about, a user can choose EXACTLY which Key/Button combination to use.

So, Chuck... just as a suggestion, consider DontPassClick/PassClick as
style options instead of global options, but be aware that I'm not in a
particular hurry for it right now.  [smile]

-- 
(void) lar3ry();                                      [email-masked]

  "I'm sorry you saw me, Billy.  Now I'll have to kill you." -- Santa

---

From: "Charles Hines" <[email-masked]>
Date: Fri, 22 Nov 1996 10:27:26 -0500

>>>>> "lar3ry" == lar3ry gensch <[email-masked]> writes:

....
lar3ry> So, Chuck... just as a suggestion, consider DontPassClick/PassClick as
lar3ry> style options instead of global options, but be aware that I'm not in a
lar3ry> particular hurry for it right now.  [smile]

Although I didn't mention it, eventually the plan is that these will
be options/modifiers on the ClickToFocus style option, but since there
aren't enough style flags until after the GSFR, and since people keep
asking about an option like that, I figured I'd add them as global for
now.  BTW, I have a few other things planned to add like this as well
for 2.0.44:

  ClickToFocusDoesntRaise/Raises - so have only clicking on border
                                   raise, like compiling with
                                   CLICKY_MODE_1 right now,
  SmartPlacementIsReallySmart - to make it use the new CleverPlacement
                                stuff

Eventually (post GSFR) these will also become styles/style modifiers,
but I figure that global is better than nothing right now.

Chuck