ComponentMovementWatcher in a VST plugin


#1

Hi.

I’m trying to detect dragging of the plugin using the ComponentMovementWatcher but it doesn’t seem to work.
Is there any way to detect dragging/moving of the plugin?

Thanks.


#2

If you’re talking about the user moving the whole plugin window (i.e. the host’s window) then no! There’s no way to detect or interfere with that, it’s entirely up to the host.


#3

Thanks Jules.

I’m trying to catch keystrokes by adding a TopLevelComponent what will ‘cover’ the inside of the plugin
and will be able to follow it whenever it’s being dragged.

A quick and dirty solution will be to use a Timer and getScreenBounds() but can’t I do it using
a ComponentMovementWatcher or something else better than the Timer?

Thanks.


#4

Sounds quite a tricky thing to make reliable, on all those different hosts and OSes… If you can avoid creating any external windows, it’s best avoided!


#5

Thanks Jules, but how can I prevent Ableton and such from eating up my keystokes?
For example, I have a Ctrl+Z shortcut for my UndoManager, when I press it, Ableton removes my plugin (Ctrl+Z removes plugin in Ableton)…

I saw some threads here messing with the winproc and such, is there any better way?

Thanks


#6

I’m afraid Ableton’s keystroke handling has always been a bit of a mystery - there are many threads about it!