Re: [wmii] small patch for wmiimenu.c

From: Bill Puschmann <puschy_AT_gmail.com>
Date: Wed, 3 May 2006 10:23:01 -0400

For what it's worth, Jonas. It happens quite often to me. However, I
always assumed I was typing too fast (and the shortcut that launches wmii
hadn't registered, so the next IMMEDIATE characters went to the focused
client). I was happy blaming my parents for making learn typing at an early
age. But if this fixes it, I'll have to find some other reason. :)

On 5/3/06, Anselm R. Garbe <garbeam_AT_wmii.de> wrote:
>
> On Wed, May 03, 2006 at 12:52:12PM +0200, WUSTRACK Jonas wrote:
> > Hi,
> >
> > I've noticed that sometimes when calling wmiimenu and
> > beginning to type just after, the first characters are ignored
> > by wmiimenu and thus sent to the selected client. This can be
> > quite annoying especially with clients like vi. Thus I've
> > made a simple patch, putting the XKeyGrab call as early as
> > possible in main (so just after the initialization of dpy).
> > It worked for me and I don't think it could cause any problems
> > on other systems.
> >
> > Here's the patch (hg diff on the lastest hg):
> >
> > --- a/cmd/wmiimenu.c Tue May 02 20:11:44 2006 +0000
> > +++ b/cmd/wmiimenu.c Wed May 03 12:45:57 2006 +0200
> > @@ -336,6 +336,12 @@ main(int argc, char *argv[])
> > fprintf(stderr, "%s", "wmiimenu: cannot open
> display\n");
> > exit(1);
> > }
> > +
> > + while(XGrabKeyboard
> > + (dpy, RootWindow(dpy, screen), True,
> GrabModeAsync,
> > + GrabModeAsync, CurrentTime) != GrabSuccess)
> > + usleep(1000);
> > +
> > screen = DefaultScreen(dpy);
>
> You overlooked a small issue, because screen is initialized
> after its first use, but I apply your patch with this fix ;)
>
> Regards,
> --
> Anselm R. Garbe ><>< www.ebrag.de ><>< GPG key: 0D73F361
>
> _______________________________________________
> wmii_AT_wmii.de mailing list
> http://wmii.de/cgi-bin/mailman/listinfo/wmii
>
Received on Wed May 03 2006 - 16:23:29 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:04:11 UTC