This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[RFA] Window placement fix


Here we go again.  This fixes the problem with tk and some window managers 
where windows slowly creep down the screen instead of appearing in the proper 
position each time insight is run.  The problem has something to do with the 
timing of geometry requests and raising a window.  Anyway, here is the patch:


2001-07-20  Martin M. Hunt  <hunt@redhat.com>

	* library/managedwin.itb: Revert to global to properly
	initialize geometry with some window managers.
	* library/managedwin.ith (shutdown): Remove _geometry.

Index: managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.16
diff -u -p -r1.16 managedwin.itb
--- managedwin.itb	2001/07/05 23:24:10	1.16
+++ managedwin.itb	2001/07/21 00:00:18
@@ -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
Request.20:X_GetPro?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]