diff options
| author | gustav_b <gustav_b@users.sourceforge.net> | 2007-09-16 15:30:50 +0000 |
|---|---|---|
| committer | gustav_b <gustav_b@users.sourceforge.net> | 2007-09-16 15:30:50 +0000 |
| commit | 71c54d4ca81eb9735c8d8b0d710667ac05798a5e (patch) | |
| tree | 9864aa4e6b03f98c6357c4ba82802192753de63b /src/ui/widget/dock-item.cpp | |
| parent | noop: (SvgBuilder::setTransform): Mark argument as not being written through. (diff) | |
| download | inkscape-71c54d4ca81eb9735c8d8b0d710667ac05798a5e.tar.gz inkscape-71c54d4ca81eb9735c8d8b0d710667ac05798a5e.zip | |
Add handling of focus tabbing for GdlDockItem + various DockItem focus
fixes.
(bzr r3764)
Diffstat (limited to 'src/ui/widget/dock-item.cpp')
| -rw-r--r-- | src/ui/widget/dock-item.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/ui/widget/dock-item.cpp b/src/ui/widget/dock-item.cpp index d615de1ff..372fe5d9d 100644 --- a/src/ui/widget/dock-item.cpp +++ b/src/ui/widget/dock-item.cpp @@ -291,10 +291,19 @@ DockItem::present() void DockItem::grab_focus() { - if (GTK_WIDGET_REALIZED (_gdl_dock_item)) + if (GTK_WIDGET_REALIZED (_gdl_dock_item)) { + + // make sure the window we're in is present + Gtk::Widget *toplevel = getWidget().get_toplevel(); + if (Gtk::Window *window = dynamic_cast<Gtk::Window *>(toplevel)) { + window->present(); + } + gtk_widget_grab_focus (_gdl_dock_item); - else + + } else { _grab_focus_on_realize = true; + } } |
