Hosts can destroy the plugin even if it has modal windows
Hosts can destroy the plugin even if it has modal windows
- Subject: Hosts can destroy the plugin even if it has modal windows
- From: Vojtěch Meluzín <email@hidden>
- Date: Sat, 09 Jul 2011 17:07:54 +0200
Hi,
I need to show modal popup windows in the plugin (for text entry, some more advanced configurations etc.). The trouble is, that when a host decides to destroy the plugin while the popup is displayed, it crashes. This is because the stack usually looks like this:
Host destroying the plugin
Mouse/key handler causing the host
Window modal loop
...
Therefore the host destroys the plugin and then when mouse/key processing ends, it gets back to the modal loop of a window that either not exists, or is attached to a plugin that no longer exists. The only solution I found so far was to prevent the modal window from loosing focus. On Windows it works well, on Mac usually as well, but not always. I'm using kMovableModalWindowClass for the window. It prevents it from loosing focus when clicking another window, but it does NOT prevent keyboard shortcuts. Now, one can press cmd+Q on many hosts and crash it obviously. Or in Ableton Live does even weirder things - it maps "-" key, which is often used for entering textual values...
Is there a way to completely forbid the host from obtaining any input events when a popup is displayed?
Thanks in advance
Vojtech
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden