A python (2.79) demo code snippet that pops up a menu dialog on right-clicking with the mouse works OK in cmd.exe (Windows7 64 bit) but when started from ConEmu the popup menu does not show.
If i look closely it could be that the menu appears for a split second but is immediately closed.
I also noticed that when started from cmd.exe the parent window maintains focus upon right-click (as the popup menu appears).
But when started from ConEmu the parent window looses focus upon right-click.
Code snippet:
from Tkinter import * # Tkinter -> tkinter in Python 3
root = Tk()
def hello():
print "hello!"
# create a popup menu
menu = Menu(root, tearoff=0)
menu.add_command(label="Undo", command=hello)
menu.add_command(label="Redo", command=hello)
# create a frame
frame = Frame(root, width=512, height=512)
frame.pack()
def popup(event):
menu.post(event.x_root, event.y_root)
# attach popup to frame
frame.bind("<Button-3>", popup)
root.mainloop()
The text was updated successfully, but these errors were encountered:
Yes, this patch fixed it. I tested with both the python code snippet as well as the Python application that led to this reported issue.
Thank you for your quick response!
A python (2.79) demo code snippet that pops up a menu dialog on right-clicking with the mouse works OK in cmd.exe (Windows7 64 bit) but when started from ConEmu the popup menu does not show.
See below for the snippet or get it from here:
http://stackoverflow.com/questions/12014210/python-tkinter-app-adding-a-right-click-context-menu
(i actually found this bug using a much larger python application but for bug-hunting this snippet is enough).
If i look closely it could be that the menu appears for a split second but is immediately closed.
I also noticed that when started from cmd.exe the parent window maintains focus upon right-click (as the popup menu appears).
But when started from ConEmu the parent window looses focus upon right-click.
Code snippet:
The text was updated successfully, but these errors were encountered: