This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[RFA] gdbtk/library/srctextwin.itb: Close wristwatch cursor leak
- To: insight at sources dot redhat dot com
- Subject: [RFA] gdbtk/library/srctextwin.itb: Close wristwatch cursor leak
- From: Nicholas Duffek <nsd at redhat dot com>
- Date: Tue, 27 Feb 2001 16:09:02 -0500
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