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

From: Stein Gunnar Bakkeby <bakkeby_AT_gmail.com>
Date: Tue, 19 Apr 2022 11:48:05 +0200

Yes I don't think this is correct.

All tabbed is doing here is receiving a FocusIn event for the main (parent)
window and giving focus to the window on the currently selected tab.

I believe this is more of an edge case that is specifically related to dwm
in relation to using tabbed and having tabbed reparent windows that have
already been managed by dwm.

I'll send another email with a proposed patch and explanation for the issue.





On Tue, Apr 19, 2022 at 11:42 AM 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__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 - 11:48:05 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 19 2022 - 12:24:35 CEST