diff options
author | Martin Hunt <hunt@redhat.com> | 2002-01-03 21:13:03 +0000 |
---|---|---|
committer | Martin Hunt <hunt@redhat.com> | 2002-01-03 21:13:03 +0000 |
commit | 19132a2b7c9f7d323c04bc8b0fc3bd514f43113d (patch) | |
tree | fe3e26f43df7eacd184cc153adc1f51b02c399f6 /gdb | |
parent | 63b9cfab5b9299337d55037181cec28d2303f2a0 (diff) | |
download | gdb-19132a2b7c9f7d323c04bc8b0fc3bd514f43113d.tar.gz |
2002-01-03 Martin M. Hunt <hunt@redhat.com>
* library/srctextwin.itb: Set focus on srcwin only
if another window doesn't have the focus.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/gdbtk/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/gdbtk/library/srctextwin.itb | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 6ba09d12f65..3597b36f978 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,8 @@ +2002-01-03 Martin M. Hunt <hunt@redhat.com> + + * library/srctextwin.itb: Set focus on srcwin only + if another window doesn't have the focus. + 2002-01-02 Keith Seitz <keiths@redhat.com> * library/interface.tcl (set_exe): Allow users to debug diff --git a/gdb/gdbtk/library/srctextwin.itb b/gdb/gdbtk/library/srctextwin.itb index 36bcf039219..c5571ae69e6 100644 --- a/gdb/gdbtk/library/srctextwin.itb +++ b/gdb/gdbtk/library/srctextwin.itb @@ -500,7 +500,7 @@ body SrcTextWin::config_win {win {asm S}} { $win configure -font $font setTabs $win $asm - + # set up some tags. should probably be done differently # !! change bg? @@ -681,8 +681,10 @@ body SrcTextWin::config_win {win {asm S}} { bind_plain_key $win Up [list %W yview scroll -1 units] bind_plain_key $win Down [list %W yview scroll +1 units] - # Make key bindings usable immediately (without mouse click in window). - focus $win + # After loading a new file, focus sometimes gets lost + # so point it back to this window if it doesn't already + # point elsewhere. + if {[focus -displayof $win] == ""} {focus $win} } # ------------------------------------------------------------------ |