Closed Bug 372177 Opened 17 years ago Closed 17 years ago

No focus event fired when a window "gets focus" because another one has been minimized

Categories

(Core :: DOM: Events, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: tbertels+bugzilla, Assigned: oliver_yeoh)

References

Details

(Keywords: regression)

Attachments

(2 files)

Steps to reproduce :
1. Open attachment 160548 [details] in a new window and click on the text field.
2. Click on this window in the taskbar then minimize it.

Actual Results :
No focus event fired when the attachment window becomes visible.
The text field is of course unusable.

This bug has appeared between

Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9a3pre) Gecko/20070220 Minefield/3.0a3pre ID:2007022005 [cairo]
and
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9a3pre) Gecko/20070221 Minefield/3.0a3pre ID:2007022104 [cairo]

so bug 261074 could be the cause.
Assignee: events → oliver_yeoh
Status: UNCONFIRMED → NEW
Ever confirmed: true
Related to Bug 371116 too?
Attached patch PatchSplinter Review
Bah!
Attachment #257822 - Flags: superreview?(roc)
Attachment #257822 - Flags: review?(emaijala)
Comment on attachment 257822 [details] [diff] [review]
Patch

When exactly is lParam 0? Is it documented somewhere?
(In reply to comment #4)
> (From update of attachment 257822 [details] [diff] [review])
> When exactly is lParam 0? Is it documented somewhere?
> 

lParam should be the window handle that would be activated/deactivated. However it is always NULL when switching between windows belonging to different processes.

I'm afraid it's not documented. I have tested this behaviour against XP and Vista and its consistent.
Attachment #257822 - Flags: superreview?(roc) → superreview+
Comment on attachment 257822 [details] [diff] [review]
Patch

Please add that to the comment. I'm not feeling too convenient relying on undocumented behavior, but let's hope it remains the same. r=emaijala
Attachment #257822 - Flags: review?(emaijala) → review+
Added comment about the undocumented behaviour.

Ere, would you be able to help check this in? Thanks in advance :)
Whiteboard: [checkin needed]
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a3pre) Gecko/20070308 SeaMonkey/1.5a] (nightly) (W2Ksp4)

> (In reply to comment #4)
> I'm afraid it's not documented. I have tested this behaviour against XP and
> Vista and its consistent.

Same Toolkit bug (=> underlying Windows behaviour...) with W2K.
Flags: in-testsuite?
Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a3pre) Gecko/20070311 Minefield/3.0a3pre
Status: RESOLVED → VERIFIED
(In reply to comment #5)
>(In reply to comment #4)
>>(From update of attachment 257822 [details] [diff] [review] [details])
>>When exactly is lParam 0? Is it documented somewhere?
>lParam should be the window handle that would be activated/deactivated. However
>it is always NULL when switching between windows belonging to different processes.
> 
>I'm afraid it's not documented.
Strange, I was sure it was documented, but Microsoft might have revised it out.
http://blogs.msdn.com/jfoscoding/Default.aspx?p=2
WM_ACTIVATE: This message activates the client area of the toplevel window.  The wParam specifies the fActive, and the lParam specifies which other window in the system was previously active.  This handle can be null and will be when the previously active window is not in the same thread.
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a3pre) Gecko/20070311 SeaMonkey/1.5a] (nightly) (W2Ksp4)

Confirming V.Fixed, with SeaMonkey.
No longer blocks: 373043
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: