Patch: raise BEFORE deiconify is better on XFree...

James Ingham jingham@cygnus.com
Fri Mar 10 15:38:00 GMT 2000


Hi, all...

I have applied the following patch.  For some oddball reason, doing

wm deiconify .
raise .

causes the window to come up half baked, and then there is a long
pause before it finished drawing itself.  Doint

raise .
wm deiconify .

is much better looking.  This is not the case on Sun's X Server, or
the HP-UX one...  I haven't looked into what is going on, but this
patch makes things look better.

Enjoy,

Jim

Index: util.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/util.tcl,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 util.tcl
*** util.tcl	2000/02/07 00:19:42	1.1.1.1
--- util.tcl	2000/03/10 23:33:56
***************
*** 30,37 ****
  # A helper procedure to keep a window on top.
  proc keep_raised {top} {
    if {[winfo exists $top]} {
-     wm deiconify $top
      raise $top
      after 1000 [info level 0]
    }
  }
--- 30,37 ----
  # A helper procedure to keep a window on top.
  proc keep_raised {top} {
    if {[winfo exists $top]} {
      raise $top
+     wm deiconify $top
      after 1000 [info level 0]
    }
  }
Index: managedwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/managedwin.itb,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 managedwin.itb
*** managedwin.itb	2000/02/07 00:19:42	1.1.1.1
--- managedwin.itb	2000/03/10 23:33:56
*************** body ManagedWin::reveal {} {
*** 31,43 ****
    update idletasks
    
    set top [winfo toplevel [namespace tail $this]]
    wm deiconify $top
    
    # I don't understand this next line and no one commented it, so it's gone.
    #focus -force [focus -lastfor $top]
    
    focus $top
-   raise $top
  }
  
  body ManagedWin::restart {} {
--- 31,43 ----
    update idletasks
    
    set top [winfo toplevel [namespace tail $this]]
+   raise $top
    wm deiconify $top
    
    # I don't understand this next line and no one commented it, so it's gone.
    #focus -force [focus -lastfor $top]
    
    focus $top
  }
  
  body ManagedWin::restart {} {


More information about the Insight mailing list