FVWM: XCircuit input focus (fwd)

From: Shaul Karl <shaulk_at_israsrv.net.il>
Date: Fri, 29 Oct 1999 10:43:57 +0200

I think the following might be of interest to the fvwm group.
It concerns a difference between various wm that caused a bug in the xcircuit
package.


------- Forwarded Message

Return-Path: tim_at_stravinsky.jhuapl.edu
Delivery-Date: Fri Oct 29 09:12:38 1999
Envelope-to: shaul_at_localhost
Received: from localhost ([127.0.0.1] ident=shaul)
        by rakefet with esmtp (Exim 3.03 #1 (Debian))
        id 11h6DE-0000Vg-00
        for <shaul_at_localhost>; Fri, 29 Oct 1999 09:12:36 +0200
Received: from mail.netvision.net.il
        by localhost with POP3 (fetchmail-5.1.2)
        for shaul_at_localhost (single-drop); Fri, 29 Oct 1999 09:12:36 +0200 (IST)
Received: from stravinsky.jhuapl.edu (stravinsky.jhuapl.edu [128.244.58.36])
        by amx.netvision.net.il (8.9.3/8.9.3) with ESMTP id QAA03474
        for <shaulk_at_netvision.net.il>; Tue, 26 Oct 1999 16:09:01 +0200 (IST)
Received: (from tim_at_localhost)
        by stravinsky.jhuapl.edu (8.8.7/8.8.7) id KAA02214;
        Tue, 26 Oct 1999 10:08:06 -0400
Date: Tue, 26 Oct 1999 10:08:06 -0400
From: "R. Timothy Edwards" <tim_at_stravinsky.jhuapl.edu>
Message-Id: <199910261408.KAA02214_at_stravinsky.jhuapl.edu>
To: rayburns_at_eskimo.com
Subject: XCircuit input focus
Cc: djohnson_at_mdsi.bc.ca, shaulk_at_netvision.net.il
Status: O

Dear Ray,
   After bringing up WindowMaker and playing around with your
suggestions and one of my own, I finally came up with a "proper"
solution to the problem. The correct solution is to have a
separate routine respond to EnterNotify events and change focus
there---I noticed the other day under fvwm (by the way, none of this
focus problem happens under the admittedly simpler twm window manager,
which is what I normally use), while I was using xcalc to figure out
scale values for an architectural drawing, that xcalc was doing
something like that: whenever I entered the window, it immediately
had keyboard focus. I didn't get the same effect in xcircuit until
I clicked in the window. To do that, you need to add, around
xcircuit.c line 1694,

   XtAddEventHandler(top, EnterWindowMask, False,
                (XtEventHandler)focusinput, NULL);

with a separate subroutine as follows:

/*----------------------------------------------------------------*/

void focusinput(w, clientdata, event)
  Widget w;
  caddr_t clientdata;
  XCrossingEvent *event;
{
   XSetInputFocus(dpy, XtWindow(w), RevertToPointerRoot, CurrentTime);
}

/*----------------------------------------------------------------*/

I ran this version under WindowMaker and the keyboard focus appears
to work right. I also updated the minor version number and posted
the corrected code to the xcircuit web page. Thanks for your help
in tracking down the problem.

                                                Regards,
                                                Tim






------- End of Forwarded Message



--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Fri Oct 29 1999 - 03:29:44 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:02 BST