Page 1 of 1

PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 2:06 pm
by Joubarbe

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)

Re: PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 2:37 pm
by Kiffi
Joubarbe wrote: Sat Sep 06, 2025 2:06 pmIs this normal that a left click triggers OnMouveMove()?
not here (Mac Mini M4 / Sequoia / PB 3.60 B1 arm64)

// Edit: PB 6.3 B1 (of course)

Re: PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 5:09 pm
by Piero
Kiffi wrote: Sat Sep 06, 2025 2:37 pmPB 3.60 B1 arm64
:shock:

PS/Edit: I really hope you already know LaunchBar ;)

Re: PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 5:17 pm
by Erlend
Not on Linux either, must be a Windows thing. (On PB 6.30 Gtk)

BR
Erlend

Re: PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 9:34 pm
by Kiffi
Piero wrote: Sat Sep 06, 2025 5:09 pm
Kiffi wrote: Sat Sep 06, 2025 2:37 pmPB 3.60 B1 arm64
:shock:
:mrgreen:

Re: PB_EventType_MouseMove triggered by LMB

Posted: Sat Sep 06, 2025 9:42 pm
by HeX0R
I think it is normal, since WM_MOUSEMOVE indicates also if the mouse buttons (e.g. MK_LBUTTON) are down.