Bug in PF_Event_ADJUST_CURSOR's reported coordinate on Windows + DPI
In my After Effects style plugin for Premiere I have a custom UI parameter. I handle it's draw, click, keydown and adjustCursor. Today I found out that Premiere makes a mess out of the u.adjust_cursor.screen_point member when sending the PF_Event_ADJUST_CURSOR events on Windows when the monitor has a non-100% DPI setting.
- Issue one: for each mouse move 2 PF_Event_ADJUST_CURSOR events are fired in succession; one with the coordinates as-is (in the same units as when drawing the param), one with those coordinates DPI adjusted (so when DPI is set to 250%, they're all 2.5 times as big).
- For most of the param's surface the DPI adjusted version is sent first, but it seems there are stable areas where the order is reversed.
- Issue two: when the cursor nears the left edge of the param (at around x ~= 75), there are areas where Premiere stops sending the as-is version of the events, only sending the DPI adjusted version.
- Observation: PF_Event_DO_CLICK puts only regular, non-DPI adjusted coordinates in u.do_click.screen_point.
Needless to say that this messes up my calculations. There seems to be no data I can use to work around this issue, right? No way to detect what version of the event is sent? If so, I could manually reverse the DPI-adjusted coordinates back to the normal units and be done with it.
This issue is present in version 24.5 (2024), but goes back at least to 13.1.5 (latest 2019 version), tested on Windows 10. The Mac version of 24.5 doesn't seem to be affected.
