samyeyo / LuaRT

Open source Windows programming framework for Lua
https://www.luart.org
Other
285 stars 17 forks source link

Drag performance lags when dragged with altdrag application #197

Closed u9g closed 3 months ago

u9g commented 3 months ago

Hi, would it be possible to fix how dragging any luart windows using the alt-drag program is kind of laggy, but dragging normal applications isn't?

https://streamable.com/zbbf6c

samyeyo commented 3 months ago

Hi u9g,

I just tried by installing AltDrag. Honestly I don't see any perceptible difference.

I don't know how AltDrag works, but it seems to use the hooking technique. This probably interferes with the event handling of the ui module. From what I was able to analyze, the moving window emits a significant number of Window:onMove() events using AltDrag, this is probably why you are experiencing lag.

In this case, it is not a bug related to LuaRT

u9g commented 3 months ago

Hi u9g,

I just tried by installing AltDrag. Honestly I don't see any perceptible difference.

When you tried it, did you hold alt and drag the window by moving it after clicking in the middle of the window or were you just dragging the top bar still?

I don't know how AltDrag works, but it seems to use the hooking technique. This probably interferes with the event handling of the ui module. From what I was able to analyze, the moving window emits a significant number of Window:onMove() events using AltDrag, this is probably why you are experiencing lag.

In this case, it is not a bug related to LuaRT

I understand, but it has to be a bug related to LuaRT considering that this doesn't happen with most other normal windows.