#18606 closed bug (fixed)

GetMouse() in MouseUp() does not show clicked button

Reported by: thaflo Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: - General Version: R1/beta4
Keywords: Cc:
Blocked By: Blocking:
Platform: x86-64

Description (last modified by thaflo)

I wrote a small app to check messages from the mouse. in MouseDown() I call GetMouse and get different numbers for the different mouse buttons in MouseUp() I call GetMouse and get always 0 for different mouse buttons

src attached run in terminal to see output

(I am using Haiku in VMWare)

Attachments (2)

MouseButtonTest.zip (5.0 KB ) - added by thaflo 15 months ago.
mouse button click app
buttontest.png (63.5 KB ) - added by thaflo 15 months ago.
my console output

Download all attachments as: .zip

Change History (6)

by thaflo, 15 months ago

Attachment: MouseButtonTest.zip added

mouse button click app

comment:1 by thaflo, 15 months ago

Description: modified (diff)

by thaflo, 15 months ago

Attachment: buttontest.png added

my console output

comment:2 by pulkomandy, 15 months ago

When MouseUp happens, the buttons are already released. So the buttons are 0.

If you need to do something on MouseUp that depends on a specific button, you have to remember in MouseDown which button was pressed.

Everything is working as intended and documented here.

comment:3 by thaflo, 15 months ago

Okay, thanks for the explanation. Didn't find that in the documentation... or at least I didn't understand it. I'm new to the Haiku API.

comment:4 by pulkomandy, 15 months ago

Resolution: fixed
Status: newclosed

I added a note about it in hrev57308.

Note: See TracTickets for help on using tickets.