OSDN Git Service

2001-07-20 Martin M. Hunt <hunt@redhat.com>
authorhunt <hunt>
Sat, 21 Jul 2001 18:49:18 +0000 (18:49 +0000)
committerhunt <hunt>
Sat, 21 Jul 2001 18:49:18 +0000 (18:49 +0000)
* library/managedwin.itb: Revert to global to properly
initialize geometry with some window managers.
* library/managedwin.ith (shutdown): Remove _geometry.

gdb/gdbtk/library/managedwin.itb

index 2a808eb..6a21987 100644 (file)
@@ -67,15 +67,17 @@ body ManagedWin::reveal {} {
   
   raise $_top
   wm deiconify $_top
+
   # Some window managers (on unix) fail to honor the geometry unless
   # the window is visible.
-  if {$_geometry != "" && $::tcl_platform(platform) == "unix"} {
-    wm geometry $_top $_geometry
-    set _geometry ""
+  if {[info exists ::$_top._init_geometry]} {
+    upvar ::$_top._init_geometry gm
+    if {$::tcl_platform(platform) == "unix"} {
+      wm geometry $_top $gm
+    }
+    unset ::$_top._init_geometry
   }
-
-  #debug "$_top geometry=[wm geometry $_top] state=[wm state $_top]"
-
+  
   # There used to be a `focus -force' here, but using -force is
   # unfriendly, so it was removed.  It was then replaced with a simple
   # `focus $top'.  However, this has no useful effect -- it just