I’ve been hunting for a Linux bug for a few days now. This is what I know for sure.
In my plugin, the position reported by MouseEvents is occasionally wrong. The mouse cursor doesn’t jump around on the screen, but anything I’m trying to drag jumps around as if the cursor is jumping or if I have a control that highlights on mouse over it flickers. I’ve traced it all the way back to the Linux windowing code and the x/y values in XPointerMovedEvent are incorrect.
If I look at the position returned by MouseInputSource::getScreenPosition() it does not jump.
During debugging I found this only happened during playback. It turns out its caused by the cursor moving in my juce based host. I have a cursor component that I call setBounds() on rather frequently to move the cursor. If I don’t move the cursor, I can drag fine in my plugin.
What I don’t understand is how this is even possible. The host and plugin are separate binaries each with their own version of juce. Not sure how they could interfere with each other at all, especially when just moving a child component in one.
Any ideas tip for tracking this down would be much appreciated.
When did you last try this? If you look at the commit history on develop you’ll see that @ftonello completely re-worked the linux backend. Can you try reproducing this on the latest develop.
Sorry for the delay on this. We can re-produce this bug. It’s really bizarre as it seems to stop once you minimise the host window and the spurious cursor position seems to depend on the host’s window location?!?
We’re trying to fix this and will get back to you.
Well rebuilding plug-ins would also resolve the issue, but we are looking for another (better) solution which would only need fixing the host. I also note that I needed to revert the fix so the bug is back on develop now. Sorry…