On Wed, May 10, 2000 at 09:29:11PM -0500, Bradley T. Hughes wrote:
> you described the problem perfectly... but allow me to elaborate further
> (and describe two problems with your patch)
> 
> first off... with sloppy focus... XSetInputFocus set the revert arg to
> PointerRoot, which tells the X server that the window under the cursor has
> input focus (which is usually root, but can be a window)
> 
> well... whenever the pointer enters a window... we set it to something
> other than PointerRoot, hence the focus will stay until if we move the
> pointer out of the window...
> 
> with ClickToFocus (you can verify this with your patch)... setting the
> focus to PointerRoot can cause weird focusing behaviour
>
> try this... open 2 xterms... focus one of them and then close it... now
> move the cursor over the other xterm, don't click, but you can type into
> it... not proper "click to type" behaviour... basically what probably needs
> to happen is to check for when the focused window is closed (or withdrawn
> due to workspace change) and then set the focus to some window not
> interested in input (like root or the toolbar window)
> 
> it's a fairly complex solution to a simple problem :)
>

Yeah, I noticed the slightly flakey focus behavior, but I couldn't
remember whether it had acted that way before -- it's been ages since
I used ClickToFocus, and I had a vague recollection of it acting that
way at one point long ago. Then again, I have _lots_ of vague
recollections.

> 
> also... the transient returning focus to its parent is definately a good
> idea, but i would recommend checking to make sure that the transient has
> focus before assigning it back to the parent
> 

Ack! I can't believe I forgot about that... It would be kind of
amusing to have your keyboard focus suddenly disappear because a
transient somewhere decided to delete itself.

I'll have to look over blackbox to reacquaint myself with the
innards (I haven't really looked at it much since the alpha started),
but maybe tomorrow I can come up with a better version of the patch.

As for the other reported problem -- X eating up a whole bunch of
ram -- I've yet to experience it on my own machine (a P166 with 32M),
but then again I've been hopping back and forth between blackbox and
KDE2 a lot lately, so it hasn't had much of a chance to run for long.
Anyway, give me a little more time ... I've still only been home for
a few hours! :)

Jeff Raven
[EMAIL PROTECTED]

Reply via email to