Closed
Bug 102099
Opened 23 years ago
Closed 21 days ago
wParam can be NULL for WM_KILLFOCUS
Categories
(Core :: DOM: UI Events & Focus Handling, defect)
Tracking
()
RESOLVED
INCOMPLETE
mozilla1.1alpha
People
(Reporter: kazhik, Unassigned)
Details
http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsWindow.cpp#3380
case WM_KILLFOCUS:
char className[19];
::GetClassName((HWND)wParam, className, 19);
if(strcmp(className, WindowClass()))
isMozWindowTakingFocus = PR_FALSE;
This wParam can be NULL. GetClassName() doesn't set className in such case.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/keybinpt_9sc3.asp
The code should be:
case WM_KILLFOCUS:
char className[19];className[0]=NULL;
if( wParam != NULL )
::GetClassName((HWND)wParam, className, 19);
if(strcmp(className, WindowClass()))
isMozWindowTakingFocus = PR_FALSE;
Comment 1•23 years ago
|
||
Or you could set isMozWindowTakingFocus to false directly if wParam is NULL.
kazhik, your suggestion isn't quite right. The strcmp() should be inside the if
as well. Taking into account what Neil suggests as well gives something like...
case WM_KILLFOCUS:
if (!wParam)
isMozWindowTakingFocus = PR_FALSE;
else {
char className[19];
::GetClassName((HWND)wParam, className, 19);
if(strcmp(className, WindowClass()))
isMozWindowTakingFocus = PR_FALSE;
}
But if wParam is a Mozilla window and wParam represents the window getting
focus, don't you think that isMozWindowTakingFocus should be set to PR_TRUE?
Do you think that the error which first of all influences GetClassName() by that
code is satisfactory because the error which first of all influences
GetClassName() by that code stops appearing?
Updated•23 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
Comment 4•23 years ago
|
||
Moving bugs from 0.9.7 for triaging in 0.9.8
Target Milestone: mozilla0.9.7 → mozilla0.9.8
Updated•23 years ago
|
Target Milestone: mozilla0.9.8 → mozilla0.9.9
Updated•23 years ago
|
Target Milestone: mozilla0.9.9 → mozilla1.1
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Updated•22 years ago
|
QA Contact: rakeshmishra → trix
Updated•15 years ago
|
Assignee: saari → nobody
QA Contact: ian → events
Assignee | ||
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
Updated•2 years ago
|
Severity: normal → S3
Comment 6•21 days ago
|
||
The code changed a lot since the bug was filed. I couldn't find the exact code as comment 0 in the searchfox now. Closing as INCOMPLETE.
If you think there's still an issue in the current m-c code, please file a new bug.
Status: NEW → RESOLVED
Closed: 21 days ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•