PB_EventType_MouseMove triggered by LMB

Just starting out? Need help? Post your questions and find answers here.
Joubarbe
Enthusiast
Enthusiast
Posts: 713
Joined: Wed Sep 18, 2013 11:54 am
Location: France

PB_EventType_MouseMove triggered by LMB

Post 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)
User avatar
Kiffi
Addict
Addict
Posts: 1504
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: PB_EventType_MouseMove triggered by LMB

Post 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)
Hygge
User avatar
Piero
Addict
Addict
Posts: 950
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: PB_EventType_MouseMove triggered by LMB

Post 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 ;)
Last edited by Piero on Sat Sep 06, 2025 5:30 pm, edited 1 time in total.
User avatar
Erlend
Enthusiast
Enthusiast
Posts: 115
Joined: Mon Apr 19, 2004 8:22 pm
Location: NORWAY

Re: PB_EventType_MouseMove triggered by LMB

Post by Erlend »

Not on Linux either, must be a Windows thing. (On PB 6.30 Gtk)

BR
Erlend
User avatar
Kiffi
Addict
Addict
Posts: 1504
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: PB_EventType_MouseMove triggered by LMB

Post 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:
Hygge
User avatar
HeX0R
Addict
Addict
Posts: 1205
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: PB_EventType_MouseMove triggered by LMB

Post by HeX0R »

I think it is normal, since WM_MOUSEMOVE indicates also if the mouse buttons (e.g. MK_LBUTTON) are down.
Post Reply