Refine geometry of idlelib htests (and a few other fix-ups).
diff --git a/Lib/idlelib/tooltip.py b/Lib/idlelib/tooltip.py
index c3eafed..843fb4a 100644
--- a/Lib/idlelib/tooltip.py
+++ b/Lib/idlelib/tooltip.py
@@ -77,20 +77,19 @@
             listbox.insert(END, item)
 
 def _tooltip(parent):  # htest #
-    root = Tk()
-    root.title("Test tooltip")
-    width, height, x, y = list(map(int, re.split('[x+]', parent.geometry())))
-    root.geometry("+%d+%d"%(x, y + 150))
-    label = Label(root, text="Place your mouse over buttons")
+    top = Toplevel(parent)
+    top.title("Test tooltip")
+    x, y = map(int, parent.geometry().split('+')[1:])
+    top.geometry("+%d+%d" % (x, y + 150))
+    label = Label(top, text="Place your mouse over buttons")
     label.pack()
-    button1 = Button(root, text="Button 1")
-    button2 = Button(root, text="Button 2")
+    button1 = Button(top, text="Button 1")
+    button2 = Button(top, text="Button 2")
     button1.pack()
     button2.pack()
     ToolTip(button1, "This is tooltip text for button1.")
     ListboxToolTip(button2, ["This is","multiple line",
                             "tooltip text","for button2"])
-    root.mainloop()
 
 if __name__ == '__main__':
     from idlelib.idle_test.htest import run