Dominik Vogt wrote: > > On Mon, Aug 27, 2001 at 05:39:22PM -0400, Bob Woodside wrote: > > > > Do you know of any more situations that were mishandled? > > Any call of f_g_b with is_focused == True is a potential candidate > for another bug. There are many calls like this all over the place
Yes. It's scary. I thought I had covered all the cases, but I obviously hadn't. > > > I'm beginning to think that f_g_b is really misplaced, and shouldn't > > be > > so tightly bound (in our thinking, at least) to focus issues. > > > > > > > Could you perhaps describe again what the problem of xfm was? > > > > xfm, or any program that uses XtTranslations to detect a double-click > > (like the test program I sent) has the following problem. If the window > > manager has a grab on an ancestor of the app window at the wrong time, > > then between the ButtonPress and the ButtonRelease the app sees a > > LeaveNotify with mode=grab and an EnterNotify with mode=ungrab (the > > opposite of the sequence we see on the parent window), telling the app > > window that another window grabbed the pointer and then gave it back. > > Actually, Xtlib sees this, which seems to confuse its translation logic, > > and it never reports anything but a single click to the app. > > Then I don't understand why your patch tries to release the grab > *later* than before. Doesn't what you say mean that double > clicking such windows can never work with MouseFocusRaises? No. With my original patch to f_g_b, the double click worked fine with MouseFocusClickRaises (and with all the other modes); it was the raising on the click that no longer worked. In the 2 spots I then changed in MoveFocus the grab was being released prematurely for a MouseFocusClickRaises window (on a focus change, but before a click happened): therefore we didn't catch the click and didn't raise the window. This didn't happen before my patch because those calls to f_g_b didn't ungrab - in fact they didn't do anything. (Actually, sticking some printfs in f_g_b, I could never see an ungrab happening, which I think was the original source of the double click problem.) With the changes to MoveFocus, both double clicking and raising worked fine. Unfortunately, in the icon manager case you mentioned, where another window is raised above the MouseFocusClickRaises window without a focus change, the former top window doesn't get regrabbed, so we won't catch a click and raise it. This is why I said I'm beginning to think that button grabs are too tightly bound to focus changing, when they're equally important to raising/lowering (at least in some cases) - and the two things don't always go together. Cheers, Bob -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]