OSDN Git Service

* library/srctextwin.itb (config_win): Give focus to $win.
authornsd <nsd>
Thu, 1 Mar 2001 12:30:41 +0000 (12:30 +0000)
committernsd <nsd>
Thu, 1 Mar 2001 12:30:41 +0000 (12:30 +0000)
gdb/gdbtk/ChangeLog
gdb/gdbtk/library/srctextwin.itb

index 21b866f..2830b18 100644 (file)
@@ -1,3 +1,7 @@
+2001-03-01  Nicholas Duffek  <nsd@redhat.com>
+
+       * library/srctextwin.itb (config_win): Give focus to $win.
+
 Tue Feb 27 23:56:23 2001  Andrew Cagney  <ac131313@redhat.com>
 
        * generic/gdbtk-cmds.c: Include recently created "regcache.h"
index 3bc5c9a..518b09d 100644 (file)
@@ -689,6 +689,9 @@ body SrcTextWin::config_win {win {asm S}} {
   # Up/Down arrow key bindings
   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
 }
 
 # ------------------------------------------------------------------
@@ -1211,6 +1214,8 @@ body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
     }
   }
   
+  set oldpane $_tpane
+
   switch $current(mode) {
     SOURCE {
       FillSource t $tagname $filename $funcname $line $addr $pc_addr $lib
@@ -1232,6 +1237,13 @@ body SrcTextWin::location {tagname filename funcname line addr pc_addr lib} {
       }
     }
   }
+
+  # After switching panes, clear the previous pane's cursor so that it isn't
+  # used as the default when no other cursors are set.
+  if { "$oldpane" != "$_tpane" } {
+    $twin configure -cursor ""
+  }
+
   set current(line) $line
   set current(tag) $tagname
   set current(addr) $addr