Posted to tcl by egavilan at Fri Aug 24 14:08:45 GMT 2012view raw

  1. Index: unix/tkUnixWm.c
  2. ===================================================================
  3. --- unix/tkUnixWm.c
  4. +++ unix/tkUnixWm.c
  5. @@ -6755,18 +6755,18 @@
  6. TkSetTransientFor(Tk_Window tkwin, Tk_Window parent)
  7. {
  8. if (parent == None) {
  9. parent = Tk_Parent(tkwin);
  10. while (!Tk_IsTopLevel(parent))
  11. - parent = Tk_Parent(tkwin);
  12. + parent = Tk_Parent(parent);
  13. }
  14. /*
  15. * Prevent crash due to incomplete initialization, or other problems.
  16. * [Bugs 3554026, 3561016]
  17. */
  18. if (((TkWindow *)parent)->wmInfoPtr->wrapperPtr == NULL) {
  19. - return;
  20. + CreateWrapper(((TkWindow *)parent)->wmInfoPtr);
  21. }
  22. XSetTransientForHint(Tk_Display(tkwin),
  23. ((TkWindow *)tkwin)->wmInfoPtr->wrapperPtr->window,
  24. ((TkWindow *)parent)->wmInfoPtr->wrapperPtr->window);
  25. }
  26.