General :
K-Meleon Web Browser Forum
General discussion about K-Meleon
Stealing focus revisited
Posted by:
MonkeeSage
Date: June 05, 2003 12:26AM
asmpgmr:
I was just noticing that when using layers the focus is stolen ever so briefly, but then it is returned to the layer that was active before the focus blur...mabye whatever Ulf did there could be implemented into the main code, so that it does the same thing for non-layered windows?
Shelumi`El
Jordan
S.D.G
Re: Stealing focus revisited
Posted by:
MonkeeSage
Date: June 05, 2003 12:59AM
I think this is the relevant code in layers.cpp, WndProc, in the first switch:
if (message == WM_SETFOCUS) {
if (hWnd != pFrame->hWndFront) {
ShowWindowAsync(hWnd, SW_HIDE);
PostMessage(pFrame->hWndFront, WM_COMMAND, id_resize, (LPARAM)0);
break;
}
Shelumi`El
Jordan
S.D.G
Re: Stealing focus revisited
Posted by:
MonkeeSage
Date: June 05, 2003 02:44AM
Actually I don't think that is the right code, I think its just the function BringWindowToTop() that will do it..not sure where exactly to try it in K-M..I'm thinking the the browser implements file on navigation start / stop...
Shelumi`El
Jordan
S.D.G
Re: Stealing focus revisited
Posted by:
asmpgmr
Date: June 05, 2003 02:37PM
MonkeeSage,
The problem seems to be due to some event and the Mozilla code somehow causes the focus change. It seems to change whenever the base page (but not the graphics) is completely loaded in a new window. This is never a problem for existing windows. Also I remember a comment in the code saying that Mozilla tries to steal the focus twice.