Re: [hackers] [tabbed][PATCH] Removes recursion while mouse is over window

From: big toaster <toasterbig_AT_gmail.com>
Date: Tue, 19 Apr 2022 11:18:07 +0100

Hi,

Looks like you're right. It occurs on lwm, but not dwm.

I'm using the unpatched latest git version.

I've also found that sometimes with surf I'll have to move my mouse
off the window and back on to get text boxes to work, so I think we
should just stop it from calling itself rather than not calling it
altogether. (could implement something like a timeout to prevent
focusin from being called too often)

On Tue, 19 Apr 2022 at 10:42, Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:
>
> On Mon, Apr 18, 2022 at 05:12:35PM +0100, bolshoytoster wrote:
> > In the focusin function, it calls focus, which calls
> > XSetInputFocus, which sends the focusin event.
> >
> > This can cause consistent ~90% cpu usage fo Xorg while the mouse
> > is over the window.
> >
> > This patch just gets rid of the call to XSetInputFocus and breaks
> > the recursion. I'm not sure what the call does, but I've had no
> > problem with input so it's probably fine to remove.
> > ---
> > tabbed.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/tabbed.c b/tabbed.c
> > index eafe28a..56660c0 100644
> > --- a/tabbed.c
> > +++ b/tabbed.c
> > _AT_@ -465,7 +465,6 @@ focus(int c)
> >
> > resize(c, ww, wh - bh);
> > XRaiseWindow(dpy, clients[c]->win);
> > - XSetInputFocus(dpy, clients[c]->win, RevertToParent, CurrentTime);
> > sendxembed(c, XEMBED_FOCUS_IN, XEMBED_FOCUS_CURRENT, 0, 0);
> > sendxembed(c, XEMBED_WINDOW_ACTIVATE, 0, 0, 0);
> > xsettitle(win, clients[c]->name);
> > --
> > 2.35.1
> >
> >
>
> Hi,
>
> I quickly tested it, but cannot reproduce the behaviour or the recursion issue.
>
> Just to be sure: do you use an unpatched tabbed and the latest git version?
>
> Is there anything special or do you have more details about your windowing
> environment?
>
> --
> Kind regards,
> Hiltjo
>
Received on Tue Apr 19 2022 - 12:18:07 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 19 2022 - 13:24:36 CEST