Re: [g-a-devel]atk_focus_tracker_notify



Marc,

When we get a deactivate signal for a menu shell, we call gtk_idle_add() to fake 
a focus notification on the object which had focus before the menu was 
displayed. The current code in CVS does that. 

Now for new code which I have not yet committed.

If a focus notification is received and an idle handler has been added, the idle 
handler is removed. This should remove the possibility of notifying focus on a 
deleted object when clicking on a menu oitem causes the previous focussed object 
to disappear.

In the case I am looking at in yelp, when I go back to the previous window, two 
notifications are actually sent; at least they will be if a patch I have 
submitted to gtkhtml2 to force a element in the document to receive focus (bug 
74369).

One is sent because of the fake focus event when the menu in the menu bar is 
deactivated and the other is sent because the accessibility code for gtkhtml2 
calls atk_focus_tracker_notify() when an element in the document receives focus.
(Note that this element is NOT represented a GtkWidget so we do not get a 
standard focus signal)

Padraig


> X-Sender: mm128299 bes central sun com
> To: "Padraig O'Briain" <Padraig Obriain sun com>, 
gnome-accessibility-devel gnome org
> Subject: Re: [g-a-devel]atk_focus_tracker_notify
> Mime-Version: 1.0
> 
> Hey Padraig,
> 
> Are there actually two notifications being sent, or is there a problem with 
> my code in gail which tries to fake a focus event when the focus leaves the 
> menubar?
> 
> On that topic, I think the code to fake focus events when the focus leaves 
> a menubar may need to migrate to the idle handler as you have doen with 
> most of the other menu selection stuff.  I notice that it's faking events 
> to objects that don't exist because the object which had the focus before 
> the menubar got focus is now gone (click exit on any file menu and you'll 
> see what I mean).  So, I think the right thing to do is to query the 
> currently focused object in the idle handler to ensure we don't fake a 
> focus event to an object that's gone.  Not quite sure how this should 
> integrate with your recent changes to the selection and focus stuff for 
> navigation to and from menus and submenus that we discussed last week.
> 
> Marc
> 
> At 05:53 PM 3/12/2002 +0000, Padraig O'Briain wrote:
> >Is there any scenario in which it makes sense for 
> >atk_focus_tracker_notify() to
> >be called consecutively for the same AtkObject?
> >
> >While working with yelp, I have found that the function may be called 
> >twice for
> >the same object after using the menubar.
> >
> >I would like to add code to atk_focus_tracker_notify() to swallow the call if
> >the AtkObject is the same as for the previous call.
> >
> >Padraig
> >
> >_______________________________________________
> >Gnome-accessibility-devel mailing list
> >Gnome-accessibility-devel gnome org
> >http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]