[21258] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: linux 9.1.18: mozilla

daemon@ATHENA.MIT.EDU (John Carr)
Sun Dec 29 15:43:00 2002

Message-Id: <200212292042.PAA16451@psi-phi.mit.edu>
To: Greg Hudson <ghudson@MIT.EDU>
cc: bugs@MIT.EDU
In-Reply-To: Your message of "21 Dec 2002 18:42:36 EST."
             <1040514156.10241.156.camel@error-messages.mit.edu> 
Date: Sun, 29 Dec 2002 15:42:58 -0500
From: John Carr <jfc@MIT.EDU>


> On Sat, 2002-12-21 at 11:53, John Carr wrote:
> > 	The setting of input focus is supposed to be invisble to clients.
> > 	The only way for a client to tell which policy is in use is to
> > 	call XGetInputFocus.
> 
> Mozilla does not appear to use XGetInputFocus except in one obscure
> place having to do with popups.  So by your reasoning, mozilla should
> not be able to behave differently with PointerRoot.

You are correct, XGetInputFocus is not the problem.  It turns out
there is a second difference between active and passive focus.  Focus
events are sent by the X server when the window manager forces focus
to a window but not when a window acquired focus as a result of mouse
movement.

gtk attempts to handle windowmanagerless input by responding to both
focus events and enter/leave events, but fails to request that
enter/leave events be delivered.  Not having noticed that the pointer
entered the window, gtk rejects keyboard input.

This change to gtk/gdk appears to fix the bug -- I can type into the
mozilla window.  I haven't done any significant testing for adverse
effects.  (It's still a horrid program, but I'm now able to experience
the intentional flaws instead of the accidental ones.)


*** /mit/source-9.1/third/gtk/gdk/gdkwindow.c	Wed Mar 14 12:11:00 2001
--- gdkwindow.c	Sun Dec 29 15:34:28 2002
***************
*** 58,64 ****
    KeyReleaseMask,
    EnterWindowMask,
    LeaveWindowMask,
!   FocusChangeMask,
    StructureNotifyMask,
    PropertyChangeMask,
    VisibilityChangeMask,
--- 58,64 ----
    KeyReleaseMask,
    EnterWindowMask,
    LeaveWindowMask,
!   FocusChangeMask|EnterWindowMask|LeaveWindowMask,
    StructureNotifyMask,
    PropertyChangeMask,
    VisibilityChangeMask,


home help back first fref pref prev next nref lref last post