GNOME Bugzilla – Bug 345140
Choosers (dialogs) do not get focus after initial request
Last modified: 2006-07-21 19:15:35 UTC
Please describe the problem: When a "Chooser", or preference GUI dialog, is requested more than once, it fails to get focus. User must alt-tab or click on the dialog to get focus to it. Steps to reproduce: 1. run lsr 2. switch to an application other than the console from where you started lsr 3. request the PerkChooser (alt-shift-P) 4. dismiss the chooser 5. request the PerkChooser again Actual results: the PerkChooser is opened, but the dialog is not given focus Expected results: the dialog should get focus Does this happen every time? yes Other information: Same problem exists with other non-LSR dialogs and frames, suggesting a bug in the way Metacity prevents applications from stealing focus. Attempts to use present() and grab_focus() have so far failed to remedy the problem.
This bug is equivalent to Orca bug# 343897, and was due to a pygtk issue that has just recently been resolved. "set_user_time is a new call in pygtk 2.9.2 or later" See: http://bugzilla.gnome.org/show_bug.cgi?id=343897
We will need to track the time stamp on device events. The solution is the following: 1) Take the timestamp data from the Keyboard device and include it in any AEEvent.InputGesture fired. 2) Extract timestamp from AEEvents where possible and provide to preExecute. 3) Provide the timestamp automatically to AEChooser.init from Task.Tools.System.loadChooser. 4) Allow the timestamp to be provided manually to Task.Tools.System.loadChooser? 5) Make the appropriate pygtk call (set_user_time).
Implemented necessary timestamp tracking. Added call to set_user_time in try/except in PerkChooser dialog. Not sure if the method is being invoked on the correct object. Will have to check with pygtk 2.9. Closing for now.