Subject: FVWM: click on window to raise it

From: Joey Hess <[email-masked]>
Date: Mon, 10 Feb 1997 19:47:42 -0500

I'm using fvwm 2.0.45. I want to have a function that, if I click anywhere
on a window (including inside it), will raise the window. Like:

AddToFunc raise_func
+      "C" Raise
Mouse 0 W A raise_func

But this doesn't pass the click on to the application in the window. Is there
a way to do that with the new fvwm?

-- 
#!/usr/bin/perl -i=-/*/~%*~%/~~%/~~~-/*/_/=~~~-/====~~! # [email-masked]
$o=35;$_="$^I-*!=====_!/";s/~/!*/g;s~%~-/ / ~g;$_.='---      Joey Hess
';s/=/__/g;y|*!| \\|;for(split/-/){print' 'x$o--."$_\n"}# a M.C. Escher fan
--
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: Kai Grossjohann <[email-masked]>
Date: 11 Feb 1997 09:20:43 +0100

>>>>> Joey Hess writes:

  Joey> I'm using fvwm 2.0.45. I want to have a function that, if I
  Joey> click anywhere on a window (including inside it), will raise
  Joey> the window. [...]

There's a global option MouseFocusClickRaises which you can set to do
this.  See the GlobalOpts entry in the man page for details.

kai
-- 
The arms should be held in a natural and unaffected way and never
be conspicuous. -- Revised Technique of Latin American Dancing

---

From: Joey Hess <[email-masked]>
Date: Tue, 11 Feb 1997 20:47:57 -0500

> this.  See the GlobalOpts entry in the man page for details.

There are no details there, just a list of the GlobalOpts. But I tried it,
and when I clicked on a window, it raised, but the click never was sent to
the program underneath.

In my fvwmrc, I have:

# This just raises windows on a single click.
AddToFunc raise_func
+      "C" Raise
# Bind it to any click in a window.
Mouse 0 W A raise_func
# Make sure to pass the click events to the program in the window.
GlobalOpts MouseFocusClickRaises

What'm I doing wrong?

-- 
#!/usr/bin/perl -lisubstr($_,39+38*sin++$y/9,2)=$s #  [email-masked]
for($s='  '||McQ;$_='JOEY HESS 'x8;print){eval$^I} #         Joey Hess
--
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: Kai Grossjohann <[email-masked]>
Date: 12 Feb 1997 08:45:03 +0100

>>>>> Joey Hess writes:

  Joey> In my fvwmrc, I have:

  Joey> # This just raises windows on a single click.
  Joey> AddToFunc raise_func
  Joey> +      "C" Raise
  Joey> # Bind it to any click in a window.
  Joey> Mouse 0 W A raise_func
  Joey> # Make sure to pass the click events to the program in the window.
  Joey> GlobalOpts MouseFocusClickRaises

  Joey> What'm I doing wrong?

Do *not* bind the mouse click with "Mouse 0 W A raise_func".
MouseFocusClickRaises binds all three mouse buttons all by itself.

kai

---

From: Joey Hess <[email-masked]>
Date: Wed, 12 Feb 1997 12:00:18 -0500

> MouseFocusClickRaises binds all three mouse buttons all by itself.

I tried adding just "GlobalOpts MouseFocusClickRaises" to my fvwmrc, getting
rid of the other stuff. But clicking in a window does not raise it.

Where can I find docs on this, or a fvwmrc that actually has it working?
-- 
#!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj #  RSA-3-lines-perl
$/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1 #         Joey Hess
lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)   #  [email-masked]
      "How appropriate, you fight like a cow." - - Guybrush Threepwood
--
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: bart hoekstra <[email-masked]>
Date: Wed, 12 Feb 1997 10:05:55 -0700 (MST)

>Where can I find docs on this, or a fvwmrc that actually has it working?

I had to apply the following patch to the fvwm source.  I got it from the
mailing list archives.  I don't have the authors name handy right now.
I had to apply the patch with the -F 3 option, otherwise it wouldn't work with
the 2.0.45 sources.  After that the GlobalOpts MouseFocusClickRaises worked.

Does anyone know if there is a way to have the ClickRaises option work with
SloppyFocus? I have SloppyFocus set right now, but I get MouseFocus if I set the
MouseFocusClickRaises options. Given the name of the option, it looks like that
is what is intended.
 
<begin patch>

diff -u -r1.2 add_window.c
     --- 1.2 1997/01/22 22:31:52
     +++ add_window.c        1997/01/22 22:34:34
     @@ -622,10 +622,8 @@
                             &a,&b,&JunkChild);
        tmp_win->xdiff -= a;
        tmp_win->ydiff -= b;
     -#ifndef CLICKTORAISE
     -  if(tmp_win->flags & ClickToFocus)
     +  if((tmp_win->flags & ClickToFocus) || Scr.MouseFocusClickRaises)
          {
     -#endif
           /* need to grab all buttons for window that we are about to
             * unhighlight */
            for(i=0;i<3;i++)
     @@ -638,9 +636,7 @@
                             ButtonPressMask, GrabModeSync,GrabModeAsync,None,
                             Scr.FvwmCursors[SYS]);
               }
     -#ifndef CLICKTORAISE
          }
     -#endif
        BroadcastConfig(M_ADD_WINDOW,tmp_win);
      
        BroadcastName(M_WINDOW_NAME,tmp_win->w,tmp_win->frame,

<end patch>

bart

bart hoekstra              (303)278-8700
Blackhawk Geometrics    fax(303)278-0789
[email-masked]      
http://www.blackhawkgeo.com          
--
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: Kai Grossjohann <[email-masked]>
Date: 12 Feb 1997 18:29:39 +0100

>>>>> bart hoekstra writes:

  bart> Does anyone know if there is a way to have the ClickRaises
  bart> option work with SloppyFocus? I have SloppyFocus set right
  bart> now, but I get MouseFocus if I set the MouseFocusClickRaises
  bart> options. Given the name of the option, it looks like that is
  bart> what is intended.

Just for the record: I applied the patch manually.  I use SloppyFocus.
Everything works, including SloppyFocus.

kai