public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* [RFA] gdbtk/library/srctextwin.itb: Close wristwatch cursor leak
@ 2001-02-27 13:07 Nicholas Duffek
  2001-02-27 13:15 ` Keith Seitz
  0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Duffek @ 2001-02-27 13:07 UTC (permalink / raw)
  To: insight

After Insight is started with an initialization file that runs or connects
to an inferior process, the mouse cursor is displayed as a busy wristwatch
rather than as an idle pointer.

I think this happens because of the following sequence:

  1. Create scratch source pane 0.
  2. When starting the inferior, set the current source pane's (pane 0's)
     mouse cursor to the wristwatch.
  3. Switch to source pane 1.
  4. After the inferior has stopped, clear the current source pane's (pane
     1's) wristwatch cursor.

Pane 0's cursor doesn't get cleared in that sequence, and no other panes
in the hierarchy have non-zero cursors, so the cursor defaults to the
wristwatch.

The appended patch fixes that by clearing the previous pane's cursor when
switching to a new pane.

gdbtk/ChangeLog:

	* library/srctextwin.itb (SrcTextWin::location): Clear previous
	pane's cursor after switching panes.

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:07:11 2001
+++ gdb/gdbtk/library/srctextwin.itb	Tue Feb 13 23:06:55 2001
@@ -1214,6 +1214,8 @@ body SrcTextWin::location {tagname filen
     }
   }
   
+  set oldpane $_tpane
+
   switch $current(mode) {
     SOURCE {
       FillSource t $tagname $filename $funcname $line $addr $pc_addr $lib
@@ -1235,6 +1237,13 @@ body SrcTextWin::location {tagname filen
       }
     }
   }
+
+  # 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

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

end of thread, other threads:[~2001-03-01  4:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27 13:07 [RFA] gdbtk/library/srctextwin.itb: Close wristwatch cursor leak Nicholas Duffek
2001-02-27 13:15 ` Keith Seitz
2001-02-27 13:55   ` Syd Polk
2001-03-01  4:37     ` Nick Duffek

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