Opened 12 years ago

Closed 12 years ago

#1720 closed bug (duplicate)

MouseDown don't reach Window for Mozilla menus/popups

Reported by: fyysik Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1/pre-alpha1
Keywords: Cc: fredrik.holmqvist@…
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

follow-up for ticket 1714 I hope I use build with both Axel's and Stephan's patches commited. While in main window of Mozilla mouse works properly, this is something very strange happening with menus (popups in Mozilla terms).

While MouseMove and MouseUp events reach BWindow successfully, MouseDown does not appear in BWindow's DispatchMessages either in BView's MouseDown.

Mozilla menus don't use any BMenu and relatives - it is separate BWindow with BView. BWindow has two specific flags set (not used in other Mozwidgets) - B_AVOID_FOCUS | B_NO_WORKSPACE_ACTIVATION.

Any idea for more detailed debugging?

Attachments (1)

app_server.zip (353.9 KB ) - added by jackburton 12 years ago.
app_server binary which doesnt' eat B_MOUSE_DOWN messages for B_AVOID_FOCUS view (for fyysik)

Download all attachments as: .zip

Change History (12)

comment:1 by jackburton, 12 years ago

Could this be a dup of #1654 ?

comment:2 by jackburton, 12 years ago

Sorry I meant #1652

comment:3 by jackburton, 12 years ago

The code in WindowLayer::MouseDown() (in the app_server) looks like this:

eat the click if we don't accept first click if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0

(Flags() & B_AVOID_FOCUS) != 0)

return;

So it seems we should just remove the second check.

in reply to:  3 comment:4 by fyysik, 12 years ago

eat the click if we don't accept first click if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0

(Flags() & B_AVOID_FOCUS) != 0)

return;

So it seems we should just remove the second check.

JBurton - can you give URL to that code? - I wish to see more context.

in reply to:  5 ; comment:6 by fyysik, 12 years ago

Replying to jackburton:

http://svn.berlios.de/viewcvs/haiku/haiku/trunk/src/servers/app/WindowLayer.cpp

After quick look at code I think it really shouldn't be there, at least in such form. B_AVOID_FOCUS should be taken in account in some another place, probably (hehe, guess that!) in focus handling part:) Code also explains why MouseMoved and MouseUp are working.

JBurton, anyone - can you provide me with appserver binary compiled with that codition removed?

Also, about ACCEPT_FIRST_CLICK. Current default BeOS/Haiku behaviour in this area is, IMHO, short way to relatives of Carpal Tunnel Syndrome. TO overcome it in BeOS I created at time special input-server add-on - "InstantClick" - http://bebits.com/app/1884.

But I think that in Haiku it is possible to add option in Mouse Preferences, near all those FFM and Warping settings - to set "Accept First Click" globally.

in reply to:  6 ; comment:7 by jackburton, 12 years ago

Replying to fyysik:

JBurton, anyone - can you provide me with appserver binary compiled with that codition removed?

Of course. I'll attach it here.

by jackburton, 12 years ago

Attachment: app_server.zip added

app_server binary which doesnt' eat B_MOUSE_DOWN messages for B_AVOID_FOCUS view (for fyysik)

in reply to:  7 comment:8 by fyysik, 12 years ago

Replying to jackburton:

JBurton, anyone - can you provide me with appserver binary compiled with that codition removed?

Of course. I'll attach it here.

Something weird happens. Unpacked it in system/servers (btw, what is "fake_app_server" there?), launched Mozilla - and it crashed badly on attempt to click menu, with message "Looper must be locked".

Rebooted, after chkbfs (doen from BeOS) - and this time - no crashes, but also nothing changed in mouse behaviour - still no B_MOUSE_DWON in BWindow::DispatchMessage and neither in BView:MouseDown.

Tried to unpack it again - still same.

comment:9 by fyysik, 12 years ago

after removing whole

statement from WindowLayer::MouseDown

if ((Flags() & B_WILL_ACCEPT_FIRST_CLICK) == 0
(Flags() & B_AVOID_FOCUS) != 0) return;

Mozilla menus started to work properly. So it seems to be really duplicate of two bugs already reported and needs axeld and stippi attention, I think.

comment:10 by tqh, 12 years ago

Cc: fredrik.holmqvist@… added

in reply to:  6 comment:11 by axeld, 12 years ago

Resolution: duplicate
Status: newclosed

This is indeed a duplicate of #1652.

Replying to fyysik:

Also, about ACCEPT_FIRST_CLICK. Current default BeOS/Haiku behaviour in this area is, IMHO, short way to relatives of Carpal Tunnel Syndrome. TO overcome it in BeOS I created at time special input-server add-on - "InstantClick" - http://bebits.com/app/1884.

But I think that in Haiku it is possible to add option in Mouse Preferences, near all those FFM and Warping settings - to set "Accept First Click" globally.

I thought the same thing when I switched to BeOS (B_ACCEPT_FIRST_CLICK was the reason I switched to FFM in BeOS), and I guess I'll implement that some day before R1 :-)

Note: See TracTickets for help on using tickets.