Re: FVWM: Fvwm configuration questions: ClickToRaise & WindowName style

From: Markus Gutschke <gutschk_at_uni-muenster.de>
Date: 04 Dec 1996 23:56:06 +0100

Elad Eyal <elad_at_CS.bgu.ac.il> writes:
> > Howver if anyone knows how to get a single mouse click in a window area to
> > raise the window, without loosing the "cut (from cut and paste)
> > functionality, I would be grateful.
>
> ... And without losing MouseFocus..!

I think, I finally understand what you are trying to achieve. As I
could not find a solution that required changes to my .fvwmrc, only. I
had a look at the C source code and came up with a little
patch. Please note, that I do not really have a clue of what I am
doing ;-) I hope, Chuck won't kill me for introducing this
hack... OTOH, maybe it is a proper solution?


Markus

--- fvwm/add_window.c.orig Thu Apr 11 17:25:58 1996
+++ fvwm/add_window.c Wed Dec 4 23:41:13 1996
_at_@ -492,8 +492,10 @@
                         &a,&b,&JunkChild);
   tmp_win->xdiff -= a;
   tmp_win->ydiff -= b;
+#ifdef SUPPRESS_CLICKTORAISE
   if(tmp_win->flags & ClickToFocus)
     {
+#endif
       /* need to grab all buttons for window that we are about to
        * unhighlight */
       for(i=0;i<3;i++)
_at_@ -506,7 +508,9 @@
                         ButtonPressMask, GrabModeSync,GrabModeAsync,None,
                         Scr.FvwmCursors[SYS]);
           }
+#ifdef SUPPRESS_CLICKTORAISE
     }
+#endif
   BroadcastConfig(M_ADD_WINDOW,tmp_win);
 
   BroadcastName(M_WINDOW_NAME,tmp_win->w,tmp_win->frame,
--- fvwm/events.c.orig Mon May 27 21:33:26 1996
+++ fvwm/events.c Wed Dec 4 23:46:03 1996
_at_@ -1030,6 +1030,25 @@
 
         }
     }
+
+#ifndef SUPPRESS_CLICKTORAISE
+ else if ((Tmp_win) && !(Tmp_win->flags & ClickToFocus) &&
+ Event.xbutton.window == Tmp_win->frame)
+ {
+ if (Tmp_win != Scr.LastWindowRaised &&
+ ((Event.xbutton.state&
+ (ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask))
+ == 0)) {
+ RaiseWindow(Tmp_win);
+ KeepOnTop();
+ }
+ XSync(dpy,0);
+ XAllowEvents(dpy,ReplayPointer,CurrentTime);
+ XSync(dpy,0);
+ return;
+ }
+#endif
+
   XSync(dpy,0);
   XAllowEvents(dpy,ReplayPointer,CurrentTime);
   XSync(dpy,0);



-- 
Markus Gutschke            Internet: gutschk_at_math.uni-muenster.de
Schlage 5a
D-48268 Greven-Gimbte
Germany
--
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Dec 04 1996 - 17:02:27 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:59 BST