public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "Martin M. Hunt" <hunt@redhat.com>
To: Insight Mailing List <insight@sources.redhat.com>
Subject: [RFA] source window focus patch
Date: Wed, 02 Jan 2002 17:13:00 -0000	[thread overview]
Message-ID: <200201030113.RAA19126@cygnus.com> (raw)

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}
 }
 
 # ------------------------------------------------------------------

             reply	other threads:[~2002-01-03  1:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-02 17:13 Martin M. Hunt [this message]
2002-01-02 17:55 ` Keith Seitz
2002-01-03 13:14   ` Martin M. Hunt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200201030113.RAA19126@cygnus.com \
    --to=hunt@redhat.com \
    --cc=insight@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).