Re: [Inkscape-devel] docked toolbar steals focus

So the toolbar steals focus and won't let it go no matter how you try.
Since
this involves moving focus not between windows but between widgets, I'm
not
sure how to address this.
Well, this basically arises as the buttons (by default) are set up to accept keyboard focus on click, but the canvas widget is not.
The toolbar buttons should probably not accept keyboard focus, though, as they (almost) all have keyboard shortcuts anyway. I have fixed that much in CVS.
Yes, this problem is gone today - thanks a lot!
Grabbing focus between widgets is accomplished via gtk_widget_grab_focus(). The widget will need to have the GTK_CAN_FOCUS flag set, however. (we should probably do this for the canvas)
OK, I'll investigate the grabs mechanism. Maybe if the fix is simple it will go into this version.
http://sourceforge.net/tracker/index.php?func=detail&aid=854425&grou...
(see my comment at bottom). Basically we need all buttons to give focus
to
the canvas at once, and all text fields must do the same on esc or enter (and not grab focus until you explicitly click on them).
Well, in the case of dialogs we at least want basic standard navigation keys like e.g. tab to advance focus to work, as well as accomodate any IMs that might be active.
With dialogs, keyboard focus now works more or less as it should: you can keyboard-navigate within a dialog, and Enter or Esc leave it. When we'll have spinbuttons and textfields in the aux toolbar, we'll need to make sure they behave consistently (tab for moving between widgets, esc to send focus to canvas, enter to set the value and send focus to canvas) and never grab focus unless clicked (or unless activated by a shortcut).
As for shortcuts, I propose this:
- all top-level menus must have hot-keys and be activated by alt-hotkey, e.g. alt-f must open the File menu
- all text labels next to spinbuttons and textfields in the aux toolbars must also have hotkeys (underscored letters), and:
-- either we make sure that these hotkeys never clash with the top menu hotkeys, and both are called by alt-hotkey
-- or we can use independent hotkeys for the aux toolbar and use a different modifier (e.g. alt-shift-hotkey) for them
Ideas?
_________________________________________________________________ The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...

On Sat, 2003-12-06 at 11:50, bulia byak wrote:
Grabbing focus between widgets is accomplished via gtk_widget_grab_focus(). The widget will need to have the GTK_CAN_FOCUS flag set, however. (we should probably do this for the canvas)
OK, I'll investigate the grabs mechanism. Maybe if the fix is simple it will go into this version.
I've taken care of the latter half in desktop.c now (setting the CAN_FOCUS widget flag).
I guess what remains is just determining when it would be appropriate to call gtk_widget_grab_focus() on the canvas widget.
-mental
participants (2)
-
bulia byak
-
MenTaLguY