#727 closed bug (fixed)
Views get B_MOUSE_DOWN events when they shouldn't
Reported by: | jackburton | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | - General | Version: | |
Keywords: | Cc: | diver | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
Looks like if a view subscribed to mouse events with SetMouseEventMask() in MouseDown(), it will get B_MOUSE_DOWN events that fall within the same window but outside the view itself, while the mask should be resetted as soon as the mouse button is released.
Change History (13)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Not out of the box, but I added a printf() in BTextView::MouseDown(), started FileTypes, selected a file type so that a textcontrol (any) becomes editable, clicked on it, then clicked outside of it (even clicking the window tab causes a mousedown event to be sent to the textcontrol/textview).
comment:4 by , 18 years ago
Cc: | added |
---|
comment:5 by , 18 years ago
I tested under Qemu with this exact scenario, but I can't reproduce this problem. I selected application/ZIP Archive, selected the text, released the mouse button outside of the view, and pressed the mouse again.
If you still have this problem, try to rebuild the app_server and see if that helps; our static libraries sometimes make problems, and I've seen the weirdest problems due to that with regards to the app_server.
comment:7 by , 18 years ago
I just tried your suggestion, the problem is still there, I found a way to reproduce it 100% with focus follows mouse.
- Start Filetypes
- click on application's little arrow to expand the application item
- click on "Be Application"
- move the mouse outside of the window so that it loses focus
- move the mouse inside the window so that it gets focus again
- click on any textcontrol.
- click again on the same textcontrol
- click anywhere else on the window.
comment:9 by , 18 years ago
Okay, I can now reproduce it - I couldn't do it before, because I moved the mouse having the mouse pressed before, and it only happens if you click once. I'll look into it.
comment:10 by , 18 years ago
Status: | new → assigned |
---|
comment:11 by , 18 years ago
Resolution: | → fixed |
---|
comment:12 by , 18 years ago
Fixed in hrev18483. Turns out the bug could only be reproduced if you pressed the button for a very short time; if you'd hold it a bit longer, the problem went away.
comment:13 by , 18 years ago
Status: | assigned → closed |
---|
Do you have a particular application/test case where this is visible?