Code: Select all
Procedure OnMouseMove()
Debug "Mouse moved"
EndProcedure
OpenWindow(0, 0, 0, 500, 500, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CanvasGadget(0, 0, 0, 500, 500)
BindGadgetEvent(0, @OnMouseMove(), #PB_EventType_MouseMove)
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Is this normal that a left click triggers OnMouveMove()? I've just spent quite some time on a bug, realising that a procedure shouldn't actually be called in my code, and that it was called because of this event. I could have a Static
position variable in that procedure and check if it varies from actual mouse position, but I wonder if this behaviour is intended? (either by Windows or PB)