Closed
Bug 50798
Opened 24 years ago
Closed 24 years ago
context menus are unuseable when using x-mouse
Categories
(Core :: XUL, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.8.1
People
(Reporter: thaynes, Assigned: mikepinkerton)
References
()
Details
(Keywords: helpwanted)
Attachments
(2 files)
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review |
When enabling focus-follows-pointer in Win NT using TweakUI, context menus can
be created using the right mouse button but they disappear when the pointer
enters the menu. They otherwise persist until another mouse click occurs in the
main window or the pointer leaves the current window, as expected. The shortcut
keys can still be used to make use of the context menu while it is visible, i.e.
B still does Back, but any menu item which does not have a shortcut is unusable.
Assignee | ||
Comment 1•24 years ago
|
||
--> future
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → Future
Comment 2•24 years ago
|
||
I'll take this one, if you want.
Comment 3•24 years ago
|
||
Context menus should never, ever accept focus. Persistant little bug...
Comment 4•24 years ago
|
||
I have the same problem but under 98 with TweakUI, focus-follows-mouse.
Comment 6•24 years ago
|
||
Does this go all the way back to nsBoxFrame::HandleEvent(), or did I completely
mess up walking back nsMenuPopupFrame::HandleEvent()? Damned inheritance.
Comment 9•24 years ago
|
||
I have found today that if you're incredibly fast you can manage to enter a
context menu without it disappearing. The context menu from a link right-clicked
arent available this way though.
Comment 10•24 years ago
|
||
That's not the whole problem. MS behavior is the menu stays up once it's up,
until you click somewhere else (context menus) or move the mouse out of the menu
(regular menus) Neither of these is working correctly in Mozilla when focus
follows mouse is set. That's why context menus are unusable. This is
(logically, if not technically) independent of the MS vs 4.x standard arguement.
(Ha Ha!! Since when is 4.x a STANDARD?)
I believe you'll find #54977 is a duplicate of this, but describes the problem
in better detail.
Comment 11•24 years ago
|
||
*** Bug 57320 has been marked as a duplicate of this bug. ***
Comment 12•24 years ago
|
||
I would like to mark this bug as critical because the inconvenience is
comparable to having the browser crash every 15 minutes under normal use.
Keyworks ui, mozilla0.9, and helpwanted should be added to expedite resolution.
This is the single most annoying bug remaining in Mozilla for the people who use
the registry X-Mouse feature. The inability to right click on a hypertext link
getting the context menu and opening the link in a new window is the single
thing that makes using IE appealing to me.
I would fix this myself if I had a non-Unix (i.e. MS-Windows) development
environment available, but unfortunately use of Outlook requires having an NT
desktop at work.
Netscape/Mozilla will not be qualified to replace IE on the Windows desktop
until this bug is fixed. Nothing short of a development BLOCKER is
substantially more important that this to those who are affected.
Comment 13•24 years ago
|
||
Saari, since you mentioned it, how would I make a context menu refuse focus?
Comment 14•24 years ago
|
||
You can try setting style to moz-user-focus: ignore, but in the case of context
menus we probably need special code to check the window type and abort the focus
sequence if the thing being focused is a popup. This is how it works on MacOS.
Comment 15•24 years ago
|
||
I could take a look at this on Windows, probably. I'll check out the
WM_GETFOCUS and WM_ACTIVATE processing.
Assignee | ||
Updated•24 years ago
|
Keywords: helpwanted
Comment 16•24 years ago
|
||
Is there any progress on this bug ? Its literally the only thing stopping me
from using moz (for browsing) 100% of the time. Everyone using X-Mouse cant open
links in new windows, view frame source etc etc making it pretty much unuseable
for proper browsing.
Echoing JAGeorge's words, cant this priority be marked up ?
Reporter | ||
Comment 17•24 years ago
|
||
There are some hacky work-arounds for using those context menus you can't enter.
First, you can get the menu up using the right-mouse click as normal, and then
step up and down the menu items using the cursor up and down keys - hit return
to select an item. This is the method I prefer. Just don't move the pointer into
the menu or it will disappear.
The second, as has previously been mentioned, is that if you are moving down and
right when you right click the menu, the pointer ends up inside the menu and you
can click as normal. This only works because the menu doesn't change pointer
focus if the pointer is inside it at creation time. Possibly a quick hack to the
code to create the menu so that the mouse is inside the menu when it is created
(probably just create the menu 1 pixel up and 1 pixel to the left of where it
should be) might do it. This would allow you to use the menu as long as the
pointer does not leave it.
Neither of these suggestions should alleviate the need to fix this properly -
the menu should not be causing a focus-change request. Pull down menus work
properly, so why not this?
Comment 18•24 years ago
|
||
Actually, pull-down menus and menu lists only work properly if you
click-and-drag. If you click - release - move mouse, the menu or menu list
disappears.
Assignee | ||
Comment 19•24 years ago
|
||
*** Bug 59513 has been marked as a duplicate of this bug. ***
Comment 20•24 years ago
|
||
Duh. I betcha this would work if we backed out bug 27364. Not a fix, for sure,
but it would be a workaround. And addressing this bug would satisfy more people
than the other one did.
Comment 21•24 years ago
|
||
Backing out bug 27364 would not fix the drop down menu problem, though it would
kludge a fix for the completely unusable context menus.
Wouldn't it be possible to simply NOT focus on menus when they pop up? Then
focus can be applied if the right menu button is released ON the menu OR the
left menu button is clicked ON the menu. This would make keeping the 27364 fix
a meaningful thing to do instead of a pain in the neck.
Comment 22•24 years ago
|
||
Yes, just don't set focus. I don't know why X mouse is causing issues; sorry,
I'm not a big linux guy. Does it want to set focus all the time?
"You can try setting style to moz-user-focus: ignore, but in the case of context
menus we probably need special code to check the window type and abort the focus
sequence if the thing being focused is a popup. This is how it works on MacOS."
Comment 23•24 years ago
|
||
Hmmmm... seems I never got back to commenting on this. I remember looking at it
but can't recall the exact results. I can probably take another shot, but not
for at least a week.
Comment 24•24 years ago
|
||
Saari, you don't have to be a big Linux guy. This is a Windows bug.
Assignee | ||
Comment 25•24 years ago
|
||
x-mouse is a geek feature. if a mozilla-ite wants to own this and up the
priority, be my guest (dean?). If it's on my plate, though, it's staying just
how it is.
Comment 26•24 years ago
|
||
Oh, so now you're calling me a geek?! Just kiddin'. I don't use X-Mouse, but
I'll take this one. There won't be a fix anytime soon, but I'll keep it on my
radar.
Assignee: pinkerton → dean_tessman
Status: ASSIGNED → NEW
Comment 27•24 years ago
|
||
*** Bug 60295 has been marked as a duplicate of this bug. ***
Comment 28•24 years ago
|
||
*** Bug 54977 has been marked as a duplicate of this bug. ***
Comment 29•24 years ago
|
||
OK, here's a weird one, and I'm hoping that someone else can duplicate this for
me and it's not my mind. I'm using the modern skin and I find that if I move
the mouse really slowly and enter the context menu from either the right side or
the bottom, the context menu stays open. But it always closes coming in from
the top or left. I wonder if it's the popup frame that's stealing focus?
Reporter | ||
Comment 30•24 years ago
|
||
I can verify Dean Tessmann's experiment. I'm currently running build 2000121820
on Win NT SP 6a and the Orbit skin, and I can enter a popup menu from the
right-hand-side or the bottom of the menu at a slow speed, but not from the top
or left. Now that is extremely wierd. If I rush it, the popup disappears.
Additionally, if the mouse is moving down and right when I right click, I can
usually get the pointer the appear inside the popup window and use it normally.
Comment 31•24 years ago
|
||
That last behavior that you mentioned is what made me ponder if it's the popup's
frame that's stealing focus. It happens because when you release the right
button, it grabs the x and y to display the context menu at, which are both +2
pixels from the current position. But because the context menu is created at
that time, you are able to move the pointer more than the 2 pixels
down and to the right before the menu is displayed. So when the menu is
actually displayed, your pointer is inside the menu.
Comment 32•24 years ago
|
||
Oh geez, how long has Mike been left out of this discussion? Adding him to the
CC: list.
Comment 33•24 years ago
|
||
X-Mouse seems to activate windows with a WM_MOUSEACTIVATE message. I might have
this tracked down to nsWindow::DealWithPopups().
(As an aside, the drop-down folder list in Outlook Express handles X-Mouse as
well as we do. tee hee)
Comment 34•24 years ago
|
||
Updated•24 years ago
|
Comment 35•24 years ago
|
||
Adding keywords, setting milestone to something other than "Future".
Because I needed the lParam from WndProc() in DealWithPopups(), I changed that
function's parameters to include it. While I was at it, I added wParam. It's
not needed now, but may be in the future.
This is a very safe patch, as DealWithPopups is called only from within
nsWindow.cpp, and it's Windows-specific.
Two questions:
1. Does anyone see any problems with the call to ShouldRollupOnMouseWheelEvent()
that I threw in there? It makes sense to me - if it's not going to roll up on
the mouse wheeling, then it shouldn't roll up on X-Mouse, either.
2. Should the changes to DealWithPopups be propogated to the OS/2 code, for
consistency?
Comment 36•24 years ago
|
||
Comment 37•24 years ago
|
||
cc: bryner for the mousewheel related question above ...
Comment 38•24 years ago
|
||
cc'ing Blake, 'cause I miss him.
Comment 39•24 years ago
|
||
Just to chime in for no good reason, this will occur on any version of Windows
from 95 up and NT4.0 (base, no SP) up as well, as long as the X-mouse style
tracking is active. I just confirmed this as well. And Tessman's guess about the
opoup stealing focus is right. It's one of those feature-bugs in Windows where
two objects can both have active focus. The mouse is moved, and focus falls on
Mozilla since that's what's under the first new pixel to where the mouse is
moved. Good luck to whoever gets to fix this. The code to handle window objects
in Windows is rather buggy. (Windows' windows wilt and wither?)
Comment 40•24 years ago
|
||
Ummm, I guess I'll take that good luck wish, because I think I fixed it last
night.
Comment 41•24 years ago
|
||
Yeah, ShouldRollupOnMousewheelEvent will give the right results, I think. The
only thing I don't like is the naming, since this isn't a mousewheel event...
perhaps we should rethink this API at some point.
Comment 42•24 years ago
|
||
ShouldIgnoreScrewedUpMouseEvents??
Comment 43•24 years ago
|
||
So now that Brian has given his OK to using the ShouldRollupOnMouseWheelEvent()
call, I guess I'm looking for a review of this.
And sorry about my last comment, Brian, I wasn't knocking the mouse wheel
messages there. I was just expressing a little frustration with the time I
spent last night tracking down how MS implemented X-Mouse. What about a name
like GetRollupOnInternalActivation, GetRollupOnWheelAndXMouse,
GetRollupOnNonUserEvents? I can't think of any short name for this one.
Anyway, do you want to file a separate bug on this one and cc: me? I'll take
care of making an actual patch after that, if you want.
Comment 44•24 years ago
|
||
*** Bug 64629 has been marked as a duplicate of this bug. ***
Comment 45•24 years ago
|
||
* gives puppy dog eyes in hopes of attracting a reviewer *
Comment 46•24 years ago
|
||
Has anyone tried this patch on their build? Toby, perhaps you have?
Reporter | ||
Comment 47•24 years ago
|
||
'Fraid not at the moment - I don't have a Mozilla source tree set up at the
moment to patch against. If nobody else can test this, I'll set up my NT build
environment (most of my compiling work is done on AIX, Solaris and Linux). As
far as the code goes, the patch looks sane enough :-)
Comment 48•24 years ago
|
||
I am going to test this patch sometime later today or early tomorrow. Watch
this space ...
Comment 49•24 years ago
|
||
Applied patch on build 2001011514
Verified that it works fine.
Requesting integration into tree.
Comment 50•24 years ago
|
||
is this patch going to be integrated into the tree ?
It would be lovely to have this fixed.
Comment 51•24 years ago
|
||
*** Bug 66659 has been marked as a duplicate of this bug. ***
Comment 52•24 years ago
|
||
If you right-click on an image that's a link, there's a duplicate access key
between Save Link As and Save Image. Was this introduced by this bug?
Comment 53•24 years ago
|
||
Errr... ignore that last comment. Right words, wrong bug. Sorry for the spam.
Comment 54•24 years ago
|
||
This is mozilla0.8, and would love to get it off my plate. Unfortunately,
nobody seems to want to review it ( * sniff * ). Any takers?
Comment 55•24 years ago
|
||
Hey rod, could you give an r= or advice on how to get one for dean's second patch?
/be
Comment 56•24 years ago
|
||
->mozilla0.9
Status: NEW → ASSIGNED
Target Milestone: mozilla0.8 → mozilla0.9
Comment 57•24 years ago
|
||
*** Bug 70345 has been marked as a duplicate of this bug. ***
Comment 58•24 years ago
|
||
Okay, so I've been running with this patch and X-Mouse on Win2k for a few days.
Probably want to resolve the ShouldRollupOn[somedescriptivename] issue, but
can Dean get some r= loving on the second patch (and/or a suggestion for the
right name)? bryner?
Assignee | ||
Comment 59•24 years ago
|
||
1) you don't use |inWParam| at all in DealWithPopups, so it doesn't need to be
passed as a param.
other than that, r=pink.
Comment 60•24 years ago
|
||
Yep, that's intentional. See my Jan 3 comment. I don't use it now, but since
I'm now passing message information into DealWithPopups(), I thought it wouldn't
hurt it put in wParam for potential future use.
Comment 61•24 years ago
|
||
*** Bug 69410 has been marked as a duplicate of this bug. ***
Comment 62•24 years ago
|
||
sr=hyatt, but test the hell out of it first.
Comment 63•24 years ago
|
||
re: ShouldRollupOnMouseWheelEvent... it's probably OK to leave this name for
now. I commented my call to it pretty heavily, and I'd hate to hold up this
patch because we have to go through and change all occurrences of the name.
Comment 64•24 years ago
|
||
See my testing checklist for bug 45108, which included some testing with
this patch checked in and x-mouse enabled. Specifically, look at items 3, 6, 8,
10, 11, and 12. I'm confident that this bug doesn't toast anything else. Plus
it sounds like jrgm has been running with it without incident. I say check this
mutha in!
Assignee | ||
Comment 65•24 years ago
|
||
taking back so i can land it.
Assignee: dean_tessman → pinkerton
Status: ASSIGNED → NEW
Target Milestone: mozilla0.9 → mozilla0.8.1
Comment 66•24 years ago
|
||
Fixed in the same check-in as the bug 45108 fix.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in
before you can comment on or make changes to this bug.
Description
•