Closed
Bug 183841
Opened 23 years ago
Closed 23 years ago
[gtk2] Shortcut for "Open Context Menu" doesn't work, shift-F10
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jessie30, Assigned: yinbolian)
References
Details
(Keywords: helpwanted)
Attachments
(1 file, 4 obsolete files)
2.16 KB,
patch
|
blizzard
:
superreview+
|
Details | Diff | Splinter Review |
Build:Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2) Gecko/20021204
OS: SunOS volleyball 5.9 Generic sun4u sparc SUNW,Sun-Blade-100
According to the mozilla keyboard plan, Shift+F10 is the general shortcut for
opening context menu. But it doesn't work for Solaris OS.
works for gtk1.2 build. =>gtk2
Blocks: gtk2
Summary: Shortcut for "Open Context Menu" doesn't work. → [gtk2] Shortcut for "Open Context Menu" doesn't work.
Comment 4•23 years ago
|
||
hmmm, this is interesting: shift-F10 doesn't seem to work for me on Linux RH8.
i'm using the metacity window manager --it's a new wm (and machine and OS, for
that matter ;), so i'm not sure if there's some setting i'm neglecting.
bryner or akkana, are you able to get shift-F10 to bring up the context menu for
a focused item in a web page in RH8?
Severity: normal → major
Keywords: nsbeta1
Summary: [gtk2] Shortcut for "Open Context Menu" doesn't work. → [gtk2] Shortcut for "Open Context Menu" doesn't work, shift-F10
Comment 5•23 years ago
|
||
erk, scratch that. somehow the shortcut is now working for me. thought i had an
item already in focus *mumble*grumble*...
Severity: major → normal
Keywords: nsbeta1
Assignee | ||
Comment 6•23 years ago
|
||
deal with the context menu key.
Assignee | ||
Updated•23 years ago
|
Attachment #108459 -
Flags: review?(bryner)
Assignee | ||
Comment 7•23 years ago
|
||
Attachment #108459 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #108459 -
Flags: review?(bryner)
Assignee | ||
Updated•23 years ago
|
Attachment #108462 -
Flags: review?(bryner)
Updated•23 years ago
|
Attachment #108462 -
Flags: review?(bryner) → review+
Assignee | ||
Updated•23 years ago
|
Attachment #108462 -
Flags: superreview?(blizzard)
Comment 8•23 years ago
|
||
Comment on attachment 108462 [details] [diff] [review]
patch against trunk
>+inline PRBool
>+nsWindow::IsContextMenuKey(const nsKeyEvent& aKeyEvent)
>+{
>+ enum { kContextMenuKey = NS_VK_F10 };
You don't need to make this an enum, just compare below.
>+
>+ return (aKeyEvent.keyCode == kContextMenuKey && aKeyEvent.isShift &&
>+ !aKeyEvent.isControl && !aKeyEvent.isMeta && !aKeyEvent.isAlt);
>+}
>+void
>+nsWindow::ConvertKeyEventToContextMenuEvent(const nsKeyEvent* aKeyEvent,
>+ nsMouseEvent* aCMEvent)
>+{
>+ *(nsInputEvent *)aCMEvent = *(nsInputEvent *)aKeyEvent;
Two things: we should fix signature on the function to use nsInputEvent instead
of casting here. Two, can we use memcpy instead of copying the structure?
It's a little more readable.
>Index: nsWindow.h
>===================================================================
>RCS file: /cvsroot/mozilla/widget/src/gtk2/nsWindow.h,v
>retrieving revision 1.30
>diff -u -r1.30 nsWindow.h
>--- nsWindow.h 16 Nov 2002 01:22:10 -0000 1.30
>+++ nsWindow.h 6 Dec 2002 08:26:49 -0000
>@@ -311,6 +311,10 @@
> static guint DragMotionTimerCallback (gpointer aClosure);
> static void DragLeaveTimerCallback (nsITimer *aTimer, void *aClosure);
>
>+ inline PRBool IsContextMenuKey(const nsKeyEvent& inKeyEvent);
>+ void ConvertKeyEventToContextMenuEvent(const nsKeyEvent* inKeyEvent,
>+ nsMouseEvent* outCMEvent);
These don't change any class specific data and don't need to be used outside of
the class so you should just make them utility functions in nsWindow.cpp.
There are examples.
Attachment #108462 -
Flags: superreview?(blizzard) → superreview-
Assignee | ||
Comment 9•23 years ago
|
||
Did not change ConvertKeyEventToContextMenuEvent prototype to nsInputEvent, we
need to assign values of nsMouseEvent.
Attachment #108462 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #109206 -
Flags: superreview?(blizzard)
Comment 10•23 years ago
|
||
Comment on attachment 109206 [details] [diff] [review]
patch (add blizzard's comments)
>+static PRBool IsContextMenuKey(const nsKeyEvent& inKeyEvent);
>+static void ConvertKeyEventToContextMenuEvent(const nsKeyEvent* inKeyEvent,
>+ nsMouseEvent* outCMEvent);
Sorry, one more comment. Please use the same style for the function names as
the statics functions declared above it. That is, use a function name like:
is_context_menu_key() instead of IsContextMenuKey(). That way we can tell
static functions from methods which usually use StudlyCaps().
Attachment #109206 -
Flags: superreview?(blizzard) → superreview-
Assignee | ||
Comment 11•23 years ago
|
||
Attachment #109206 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #109296 -
Flags: superreview?(blizzard)
Comment 12•23 years ago
|
||
Comment on attachment 109296 [details] [diff] [review]
patch(utility function name to lower case)
sr=blizzard
Attachment #109296 -
Flags: superreview?(blizzard) → superreview+
Comment 13•23 years ago
|
||
Checked in. Thanks!
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 14•23 years ago
|
||
where would gtk2 verification builds reside? i checked the following location,
but it's empty.
ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/Red_Hat_8x_RPMS/
Updated•7 years ago
|
Component: Keyboard: Navigation → User events and focus handling
Comment 16•2 years ago
|
||
Depends on D180955
Comment 17•2 years ago
|
||
A patch has been attached on this bug, which was already closed. Filing a separate bug will ensure better tracking. If this was not by mistake and further action is needed, please alert the appropriate party. (Or: if the patch doesn't change behavior -- e.g. landing a test case, or fixing a typo -- then feel free to disregard this message)
Comment 19•2 years ago
|
||
Thanks Emilio, I missed a digit in the bug# while writing the commit message. Sadly bugzilla/phabricator seem to be a bit unreliable right now, so the patch hasn't been moved yet.
Flags: needinfo?(tschuster)
Comment 20•2 years ago
|
||
Comment on attachment 9339097 [details]
WIP: Bug 183841 - Use RFPTarget::ScreenOrientation for the orientation listener
Revision D180956 was moved to bug 1838415. Setting attachment 9339097 [details] to obsolete.
Attachment #9339097 -
Attachment is obsolete: true
You need to log in
before you can comment on or make changes to this bug.
Description
•