This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] source window focus patch


For the last 6 months, the console window has been almost useless due to 
the bug that Keith recently fixed, plus another nasty bug that keeps taking 
thefocus away from the console window and puts it on the source window.  This
patch should fix that.

-- 
Martin Hunt
GDB Engineer
Red Hat, Inc.

2002-01-02  Martin M. Hunt  <hunt@redhat.com>

	* library/srctextwin.itb: Set focus on srcwin only
	if another window doesn't have the focus.

Index: srctextwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/srctextwin.itb,v
retrieving revision 1.28
diff -u -p -r1.28 srctextwin.itb
--- srctextwin.itb	2001/10/04 15:01:36	1.28
+++ srctextwin.itb	2002/01/03 01:08:27
@@ -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}
 }
 
 # ------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]