This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] gdbtk/library/srctextwin.itb: Give focus to source window
- To: insight at sources dot redhat dot com
- Subject: [RFA] gdbtk/library/srctextwin.itb: Give focus to source window
- From: Nicholas Duffek <nsd at redhat dot com>
- Date: Tue, 27 Feb 2001 15:56:36 -0500
The source window doesn't have keyboard focus after Insight starts and
after switching the source display type (source, assembly, etc.).
As a result, various hot keys ("R", "S", etc.) don't work until the user
clicks the mouse in the source window.
The appended patch fixes that by giving focus to the source window
whenever it's [re]configured.
gdbtk/ChangeLog:
* library/srctextwin.itb (config_win): Give focus to $win.
Okay to apply?
Nicholas Duffek
<nsd@redhat.com>
[patch follows]
Index: gdb/gdbtk/library/srctextwin.itb
===================================================================
diff -up gdb/gdbtk/library/srctextwin.itb gdb/gdbtk/library/srctextwin.itb
--- gdb/gdbtk/library/srctextwin.itb Tue Feb 13 23:06:55 2001
+++ gdb/gdbtk/library/srctextwin.itb Tue Feb 13 23:06:15 2001
@@ -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
}
# ------------------------------------------------------------------