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 <[EMAIL PROTECTED]> 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

_______________________________________________
[email protected] mailing list
http://wmii.de/cgi-bin/mailman/listinfo/wmii

_______________________________________________
[email protected] mailing list
http://wmii.de/cgi-bin/mailman/listinfo/wmii

Reply via email to