Closed
Bug 672193
Opened 14 years ago
Closed 13 years ago
Improve WM_APPCOMMAND support ("Close" Multimedia Key on Windows closes browser, not current tab)
Categories
(Core :: Widget: Win32, defect)
Tracking
()
RESOLVED
FIXED
mozilla20
People
(Reporter: codewilly, Assigned: masayuki)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Whiteboard: [parity-IE][parity-Chrome][parity-Opera])
Attachments
(1 file, 2 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110718 Firefox/8.0a1 SeaMonkey/2.5a1
Build ID: 20110718003016
Steps to reproduce:
Press "Close" key (F6) on Microsoft Natural Keyboard while multiple tabs with web pages are open.
(Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a1) Gecko/20110718 Firefox/8.0a1 SeaMonkey/2.5a1)
(I think a WM_CLOSE is sent to the application)
Actual results:
Mozilla closes.
Expected results:
Current tab should close, as did in previous versions.
Verified with:
Build identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.9.1.20pre) Gecko/20110606 SeaMonkey/2.0.15pre
![]() |
||
Comment 1•14 years ago
|
||
Does this also happen with Firefox 8.0a? I can't test as I don't have a Microsoft Natural Keyboard
> (I think a WM_CLOSE is sent to the application)
Previously each tab would have a separate HWND but now that's all gone and only the main browser window has a HWND. Perhaps that's what's happening.
Have looked again,
the keyboard sends a WM_APPCOMMAND message (0x319), not WM_CLOSE.
The value GET_APPCOMMAND_LPARAM(lParam) is APPCOMMAND_CLOSE,
where the documentation says:
"Close the window (not the application)."
There must be specific code there to handle the WM_APPCOMMAND message,
so this would be the place to look at.
![]() |
||
Comment 3•14 years ago
|
||
This is probably core code. To confirm check that the same occurs for Firefox 8.0a
Have checked with Firefox 8.0a (Nightly) 8.0a1 (2011-07-19), same bug here:
Standard install, Press Multimedia Key "Close",
warning message of closing multiple tabs, if answered yes Browser closes.
![]() |
||
Comment 5•14 years ago
|
||
Moving to Core.
Component: General → Widget
Product: SeaMonkey → Core
QA Contact: general → general
Assignee | ||
Comment 6•13 years ago
|
||
We need to support some actions of WM_APPCOMMAND in widget. And browser needs to handle the command events. So, this bug needs both modules' people.
Assignee: nobody → masayuki
Status: UNCONFIRMED → ASSIGNED
Component: Widget → Widget: Win32
Ever confirmed: true
Summary: "Close" Multimedia Key on Windows closes browser, not current tab → Improve WM_APPCOMMAND support ("Close" Multimedia Key on Windows closes browser, not current tab)
Whiteboard: [parity-IE][parity-Chrome][parity-Opera]
Assignee | ||
Comment 7•13 years ago
|
||
First, we should implement edit actions since it's easier. We can use content command events which are used for handling WM_CUT, WM_COPY, WM_PASTE, EM_UNDO and EM_REDO.
Attachment #695713 -
Flags: review?(jmathies)
Assignee | ||
Comment 8•13 years ago
|
||
Next, we should need to add new command atoms for New, Open, Close, Find, Help, Print, Send Mail, Forward Mail and Reply To Mail.
Firefox should do nothing for Forward Mail and Reply To Mail. So, nsWindow should check the result of the command event. And command event handler should consume the events if it handles the events.
New and Close cause opening or closing tab on other browsers (IE10, Opera and Chrome). So, we should handle the manipulation target is current tab. However, somebody might like current behavior better. I.e., somebody might want to open/close window instead of tab. For such users, I added the new prefs for them.
I'm not sure if this patch needs ui-review too. If it's necessary, let me know.
Attachment #695714 -
Flags: review?(jmathies)
Attachment #695714 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 9•13 years ago
|
||
Comment 10•13 years ago
|
||
Comment on attachment 695714 [details] [diff] [review]
part.2 Support some actions of WM_APPCOMMAND such as New, Open, Close, Save, Find, Help, SendMail, ReplyToMail and ForwardMail
I think New/Close should operate on tabs, and we shouldn't introduce a pref for that. r=me on the browser/ portions with that addressed.
Attachment #695714 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 11•13 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #10)
> Comment on attachment 695714 [details] [diff] [review]
> part.2 Support some actions of WM_APPCOMMAND such as New, Open, Close, Save,
> Find, Help, SendMail, ReplyToMail and ForwardMail
>
> I think New/Close should operate on tabs, and we shouldn't introduce a pref
> for that. r=me on the browser/ portions with that addressed.
Okay, I'll remove the prefs. Thank you!
Assignee | ||
Comment 12•13 years ago
|
||
Attachment #695714 -
Attachment is obsolete: true
Attachment #695714 -
Flags: review?(jmathies)
Attachment #695934 -
Flags: review?(jmathies)
Assignee | ||
Comment 13•13 years ago
|
||
Comment on attachment 695713 [details] [diff] [review]
part.1 Support edit actions of WM_APPCOMMAND such as Copy, Cut, Paste, Undo and Redo
Oops, I forgot filing another bug for this. See bug 823904.
Attachment #695713 -
Flags: review?(jmathies)
Assignee | ||
Updated•13 years ago
|
Attachment #695713 -
Attachment is obsolete: true
![]() |
||
Updated•13 years ago
|
Attachment #695934 -
Flags: review?(jmathies) → review+
Assignee | ||
Comment 14•13 years ago
|
||
Comment 15•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
![]() |
||
Comment 16•13 years ago
|
||
this might have caused Bug 830234 - Browse back/forward with Multimedia Keyboard goes two steps back/forward
Can anyone reproduce this? Unfortunately I don't have a MS Natural Keyboard 4000.
You need to log in
before you can comment on or make changes to this bug.
Description
•