Open
Bug 127761
Opened 24 years ago
Updated 3 years ago
Potential Focus problem when switching application
Categories
(Core :: XUL, defect)
Tracking
()
NEW
People
(Reporter: bugzilla, Unassigned)
Details
In nsWindow.cpp, while processing a WM_KILLFOCUS, we set isMozWindowTakingFocus
to false if the new window that get the focus is own by Mozilla. The problem is
that since we support drop shadow windows (see bug 118368), we have 2 classes
of windows in Mozilla but we test only for one of them. That sound wrong to me
and could probably be the cause of some wierd focus problem.
| Reporter | ||
Comment 1•24 years ago
|
||
proposed fix:
case WM_KILLFOCUS:
- char className[19];
- ::GetClassName((HWND)wParam, className, 19);
- if(strcmp(className, WindowClass()))
+ char className[29];
+ ::GetClassName((HWND)wParam, className, 29);
+ if(strcmp(className, WindowClass()) && strcmp(className,
WindowPopupClass()))
isMozWindowTakingFocus = PR_FALSE;
if(gJustGotDeactivate) {
Comment 2•24 years ago
|
||
Yeah, we need to add any types that we may have added to this check.
Comment 3•24 years ago
|
||
Use sizeof className, not the repeated hardwired 29. Giving this to bryner,
bounce to trudelle if I did wrong. I seriously doubt hyatt should get this.
/be
Assignee: hyatt → bryner
+ if(strcmp(className, WindowClass()) && strcmp(className,
WindowPopupClass()))
Shouldn't that be || instead of &&?
| Reporter | ||
Comment 5•24 years ago
|
||
Right, should be OR (||) and not AND (&&)
No, I was wrong. It should be &&. Expanded version of what you'd originally
written:
if (strcmp(className, WindowClass()) <> 0 && strcmp(className,
WindowPopupClass()) <> 0)
isMozWindowTakingFocus = PR_FALSE;
Sorry, strcmps mess me up sometime. Using || would always evaluate to true.
Updated•20 years ago
|
Assignee: bryner → jag
QA Contact: jrgmorrison → xptoolkit.widgets
Updated•17 years ago
|
Assignee: jag → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•