tkMessageBox dialog icon is duplicated in unpredictable ways

71 views Asked by At

Consider:

import Tkinter as tk
import tkMessageBox
root = tk.Tk()
root.withdraw()

if True:
    tkMessageBox.askyesno("aa", "bb?")
tkMessageBox.askyesno("aa1", "bb1?")
tkMessageBox.askyesno("aa2", "bb2?")

enter image description here

When the second or the third (the results vary between the runs!) tkMessageBox.askyesno is invoked, two icons (both for the title "aa1" or "aa2", respectively) appear on my Ubuntu 16.04 launcher as shown in the above screenshot. I tried doing root.update() between the calls of tkMessageBox.askyesno without improvement. What is going on and how do I fix this?

0

There are 0 answers