I'll make a video tommorow and also test the drag and move code which uses real time OS mouse input. However, the bug happens on linux with vsync in windowed and fullscreen mode. BUT, on windows, with vsync on, it only happens in fullscreen mode. I think it's a bigger problem here.... I tested in Guild Wars on windows, and the bug is also there, of course only on full screen vsync. Strange.... But I just don't know why on linux this happens also on windowed vsync.
And another thing that I don't understand is why vsync causes this bug and limiting to 60 fps using waiting at the end of frame doesn't. Clearly there is something going on with window events while vsynced, but it's different on windows and linux... I hope real time input will solve it.
edit:
From my research, it looks like that vsync indeed causes mouse lag related to double buffering in some way. And it also may be that you will only get mouse moved event 60 times a second and it isn't "you get it when you ask". but rather "vsync makes an event for you every 1/60th and you won't get exactly at the time". Of course, setting frame limit to 60 using timers, gives you "you get event when you ask for it". I think real time mouse input not based on event is a solution, but currenctly I'm fixing some bug in my drag and move code so I can't tell for sure... This is wrong, the input lag is not based on input - the app gets input perfectly right (even just window events), but just the display() operation lags, because it waits for vsync. And the mouse moves independent of your app, so that causes the lag. It's not a bug in TGUI, it's just classic vsync input lag.
Well the solution may be to use triple buffering - which would be a question to Lauren. But, I doubt we will see it quickly...
edit2:
No, at least in my poor drag and move code real time os input didn't help... The question is why on windows the bug is only on fullscreen vsync while on linux it happens on both windowed and fullscreen vsync...
edit3:
When using both vsync and framerate limit @ 60, the bug is... not present. I don't get it, I have no idea what's going on and why on Windows in windowed vsync the bug isn't present....