public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] source window focus patch
@ 2002-01-02 17:13 Martin M. Hunt
  2002-01-02 17:55 ` Keith Seitz
  0 siblings, 1 reply; 3+ messages in thread
From: Martin M. Hunt @ 2002-01-02 17:13 UTC (permalink / raw)
  To: Insight Mailing List

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] source window focus patch
  2002-01-02 17:13 [RFA] source window focus patch Martin M. Hunt
@ 2002-01-02 17:55 ` Keith Seitz
  2002-01-03 13:14   ` Martin M. Hunt
  0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz @ 2002-01-02 17:55 UTC (permalink / raw)
  To: Martin M. Hunt; +Cc: Insight Mailing List

On Wed, 2 Jan 2002, Martin M. Hunt wrote:

> 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.

Ok, I know that this all stems from Nick Duffek's change on 2001-03-01,
and I think that this patch is worth a try. We'll have to watch for focus
loss inside the source window while stepping.

If anyone notices any focus problems with the source window, please let us
know.

Thanks, Martin.
Keith

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFA] source window focus patch
  2002-01-02 17:55 ` Keith Seitz
@ 2002-01-03 13:14   ` Martin M. Hunt
  0 siblings, 0 replies; 3+ messages in thread
From: Martin M. Hunt @ 2002-01-03 13:14 UTC (permalink / raw)
  To: Keith Seitz; +Cc: Insight Mailing List

Checked in.

Martin


On Wednesday 02 January 2002 05:55 pm, Keith Seitz wrote:
> On Wed, 2 Jan 2002, Martin M. Hunt wrote:
> > 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.
>
> Ok, I know that this all stems from Nick Duffek's change on 2001-03-01,
> and I think that this patch is worth a try. We'll have to watch for focus
> loss inside the source window while stepping.
>
> If anyone notices any focus problems with the source window, please let us
> know.
>
> Thanks, Martin.
> Keith
>
> > --
> > 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}
> >  }
> >
> >  # ------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-01-03 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 17:13 [RFA] source window focus patch Martin M. Hunt
2002-01-02 17:55 ` Keith Seitz
2002-01-03 13:14   ` Martin M. Hunt

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).