r=pedemont, sr=blizzard (platform specific), a=mkaply
Send an extra focus changed message to be more like Windows (Java focus)


git-svn-id: svn://10.0.0.236/trunk@150399 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2003-12-17 21:02:26 +00:00
parent 07eba649cc
commit 2ba9f517a6
2 changed files with 9 additions and 1 deletions

View File

@@ -441,6 +441,12 @@ MRESULT nsFrameWindow::FrameMessage( ULONG msg, MPARAM mp1, MPARAM mp2)
}
}
break;
/* To simulate Windows better, we need to send a focus message to the */
/* client when the frame is activated */
case WM_ACTIVATE:
if (SHORT1FROMMP(mp1))
WinPostMsg(mWnd, WM_FOCUSCHANGED, 0, MPFROM2SHORT(1,0));
break;
}
if( !bDone)

View File

@@ -2608,7 +2608,9 @@ PRBool nsWindow::ProcessMessage( ULONG msg, MPARAM mp1, MPARAM mp2, MRESULT &rc)
printf("[%x] NS_GOTFOCUS (%d)\n", this, mWindowIdentifier);
#endif
result = DispatchFocus(NS_GOTFOCUS, isMozWindowTakingFocus);
if (gJustGotActivate) {
/* If mp1 is 0, this is the special WM_FOCUSCHANGED we got */
/* from the frame activate, so act like we just got activated */
if (gJustGotActivate || mp1 == 0) {
gJustGotActivate = PR_FALSE;
gJustGotDeactivate = PR_FALSE;
#ifdef DEBUG_FOCUS