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:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user