iPlug2 / iPlug2

C++ Audio Plug-in Framework for desktop, mobile and web
https://iplug2.github.io
Other
1.92k stars 284 forks source link

Unexpected (and undesirable) change in mouse behaviour #902

Closed heebje closed 2 years ago

heebje commented 2 years ago

Hi,

I've noticed an unexpected (and undesirable) change in behaviour when left-click-dragging control knobs.

It used to be the case that, when left-click-dragging, the mouse would disappear, the control would react, and upon release, the mouse would reappear IN THE SAME SPOT where it was clicked.

Now suddenly, upon release, the mouse reappears IN A DIFFERENT SPOT than where it was clicked, namely corresponding to the actual mouse movement.

This is undesirable and makes operating the knobs uncomfortable.

Was this changed by design, or has a bug crept in? If it was changed by design, how can I reinstate the old behaviour?

Many thanks,

Matthijs

N.B.: Tried with new, freshly cloned iPlug2, using a fresh duplicate of IPlugEffect, no changes made. System: Windows 11, 64 bit. Bug affects both app and vst3 (on Reaper).

heebje commented 2 years ago

mouse_behaviour

AdamSBx commented 2 years ago

A few months ago, I had the same problem with one of my custom controls after updating to the latest version of IPlug2.

According to the notes I made because I was planning to report this, IGraphics::MoveMouseCursor() which is also used by the Knob class in IPlug2 stopped working (on Windows) after this commit.

After I undid the changes from this commit, it worked again.

AlexHarker commented 2 years ago

IPlug2 aims to detect tablet or touch input and not move the cursor when it is present. The changes referenced came from a PR that was aiming to improve the detection of that, but it looks like the added half of the test might be returning incorrectly on some systems.

The relevant PR was https://github.com/iPlug2/iPlug2/pull/550

@olilarkin - do we need to look in more detail at this?

olilarkin commented 2 years ago

Seems so!

On Tue, 27 Sep 2022 at 00:27, Alex Harker @.***> wrote:

IPlug2 aims to detect tablet or touch input and not move the cursor when it is present. The changes referenced came from a PR that was aiming to improve the detection of that, but it looks like the added half of the test might be returning incorrectly on some systems.

The relevant PR was #550 https://github.com/iPlug2/iPlug2/pull/550

@olilarkin https://github.com/olilarkin - do we need to look in more detail at this?

— Reply to this email directly, view it on GitHub https://github.com/iPlug2/iPlug2/issues/902#issuecomment-1258708979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFACLSA3GA33YLOWSN75WLWAIPL5ANCNFSM6AAAAAAQU4ATBY . You are receiving this because you were mentioned.Message ID: @.***>

olilarkin commented 2 years ago

reverted the offending commit on master