* [RFA] gdbtk/library/managedwin.itb: Don't grow source window on Cygwin
@ 2001-02-27 12:49 Nicholas Duffek
2001-02-27 12:58 ` Keith Seitz
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas Duffek @ 2001-02-27 12:49 UTC (permalink / raw)
To: insight
On Cygwin, each Insight run expands the source window vertically by 19
pixels. This happens because:
1. Window geometries are saved as gdbtk.ini preferences during
ManagedWin window destructor callbacks.
2. The source window's menu bar is deleted before the source window's
destructor is called.
3. On Windows, a window's menu bar is deleted by calling SetMenu(),
which has the side-effect of expanding the window by the menu bar
height.
4. Therefore, the source window's menu bar height (19 pixels) is added
to the source window before its window geometry is saved as a
gdbtk.ini preference.
The appended patch fixes that by moving the geometry save operation from
ManagedWin::destructor to ManagedWin::shutdown.
gdbtk/ChangeLog:
* library/managedwin.itb (ManagedWin::shutdown): Save each
managed window's geometry as a preference.
* library/managedwin.ith (ManagedWin::destructor): Don't save
managed windows' geometries as preferences.
Okay to apply?
Nicholas Duffek
<nsd@redhat.com>
[patch follows]
Index: gdb/gdbtk/library/managedwin.itb
===================================================================
diff -up gdb/gdbtk/library/managedwin.itb gdb/gdbtk/library/managedwin.itb
--- gdb/gdbtk/library/managedwin.itb Sun Feb 25 02:35:16 2001
+++ gdb/gdbtk/library/managedwin.itb Sun Feb 25 02:35:10 2001
@@ -71,6 +71,8 @@ body ManagedWin::shutdown {} {
set activeWins {}
foreach win $manage_active {
if {[$win isa ManagedWin]} {
+ set g [wm geometry [winfo toplevel [namespace tail $win]]]
+ pref setd gdb/geometry/[namespace tail $win] $g
lappend activeWins [$win pickle]
}
}
Index: gdb/gdbtk/library/managedwin.ith
===================================================================
diff -up gdb/gdbtk/library/managedwin.ith gdb/gdbtk/library/managedwin.ith
--- gdb/gdbtk/library/managedwin.ith Sun Feb 25 02:35:21 2001
+++ gdb/gdbtk/library/managedwin.ith Sun Feb 25 02:35:10 2001
@@ -81,21 +81,11 @@ class ManagedWin {
set manage_active [lreplace $manage_active $i $i]
}
- # save geometry
- set g [wm geometry [winfo toplevel [namespace tail $this]]]
- pref setd gdb/geometry/[namespace tail $this] $g
-
# If no toplevels remain, quit. However, check the quit_if_last
# flag since we might be doing something like displaying a
# splash screen at startup...
if {!$numTopWins && [quit_if_last]} {
- # save window positions of remaining windows
- foreach obj $manage_active {
- set g [wm geometry [winfo toplevel [namespace tail $obj]]]
- pref setd gdb/geometry/[namespace tail $obj] $g
- }
- pref_save
gdb_force_quit
} else {
destroy_toplevel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-03-01 4:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-27 12:49 [RFA] gdbtk/library/managedwin.itb: Don't grow source window on Cygwin Nicholas Duffek
2001-02-27 12:58 ` Keith Seitz
2001-02-27 13:54 ` Syd Polk
2001-03-01 4:51 ` 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).