Subject: Re: FVWM: How to make ClickToFocus working regardless of modifier key?

From: Samuel Chung <[email-masked]>
Date: Wed, 24 Mar 1999 09:28:34 -0800 (PST)

Thank you Dominik!! It work, but it only work when I
click on frame or side border or title. How can I make
it work on the application window? It seem to be that
application window can be set to focus by only one
single click and without modifier key.

I try make use of "mouse" command in the .fvwm2rc file
such as:

	mouse 0 W A Focus

This command will bring the focus to the window, but
I cannot do any action with any mouse click to the 
window any more. So, this command doese not help.
Do you know any work-around for it?

Actually, I am writting an application with multiple
windows. I like to change my focus on those window
when
I press any key combination with mouse click on it.
Then, I carry on any action from one window to other
without extra user input. Do you know which apart of
the source I should modified to make this work too.

Once again, thank you very much for your help!!

Samuel

--- Dominik Vogt <[email-masked]> wrote:
> You're out of luck here. ClickToFucus does not work
> with modifiers pressed.  If you absolutely need this
> you can modify the source:
> 
> In file fvwm/events.c, function HandleButtonPress:
> 
> Replace
> 
>   /* click to focus stuff goes here */              

>                           
>   if((Tmp_win)&&(Tmp_win->flags &
> ClickToFocus)&&(Tmp_win != Scr.Ungrabbed) &&  
>      (!MaskUsedModifiers(Event.xbutton.state)))     

>   {                                                 

>                           
> 
> With
> 
>   /* click to focus stuff goes here */              

>                           
>   if((Tmp_win)&&(Tmp_win->flags &
> ClickToFocus)&&(Tmp_win != Scr.Ungrabbed))          

>   {                                                 

>                           
> 
> (I didn't test this myself).
> 
> The following command solves your second problem:
> 
>   GlobalOpts ClickToFocusPassesClick
> 
> Bye
> 
> Dominik
> 
> -- 
> Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
> Herrenberger Str.130, 71034 Boeblingen, Germany
> phone: 07031/14-4596, fax: 07031/14-3883,
> [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].

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

--
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: Thu, 1 Apr 1999 00:50:42 +0200

> single click and without modifier key.

Hmm, works for me. Can you provide me all your Style
and GlobalOpt lines? Perhaps I can see it then, but
from looking at the code I can't imagine how this can happen.

> Do you know any work-around for it?

Like I said, it should work. What version of fvwm are you
using? 

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].