I added the icon of my app to the system tray. When the user clicks on the tray icon a small window without a title bar is shown using a CallOutBox. That window should automatically hide when the user clicks anywhere outside the CallOutBox very much like a popup menu.
Within the main app window this works fine but when I tried to use it for the system tray window the window did not always hide when I clicked outside. It seems hiding of the CallOutBox is is related to the main app window because it always hides correctly if I click somewhere into the app window itself.
I am not sure if this is the expected behavior of a CallOutBox. Wouldn’t it make sense to also hide it when the user clicks anywhere outside the app itself? Maybe the CallOutBox is not the right tool for what I am trying to do. What else could be used to achieve a popup menu like behaviour?