зеркало из https://github.com/mozilla/pjs.git
Move focus shifting code from nsScrollingView.cpp to nsEventStateManager.cpp
This commit is contained in:
Родитель
dcab568567
Коммит
f449cdd75c
|
@ -113,6 +113,10 @@ nsEventStateManager::PostHandleEvent(nsIPresContext& aPresContext,
|
|||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
|
||||
case NS_MOUSE_RIGHT_BUTTON_DOWN:
|
||||
if (nsnull != aEvent->widget) {
|
||||
aEvent->widget->SetFocus();
|
||||
}
|
||||
//Break left out on purpose
|
||||
case NS_MOUSE_LEFT_BUTTON_UP:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_UP:
|
||||
case NS_MOUSE_RIGHT_BUTTON_UP:
|
||||
|
@ -126,6 +130,12 @@ nsEventStateManager::PostHandleEvent(nsIPresContext& aPresContext,
|
|||
ShiftFocus();
|
||||
aStatus = nsEventStatus_eConsumeNoDefault;
|
||||
break;
|
||||
case NS_VK_PAGE_DOWN:
|
||||
case NS_VK_PAGE_UP:
|
||||
break;
|
||||
case NS_VK_DOWN:
|
||||
case NS_VK_UP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -113,6 +113,10 @@ nsEventStateManager::PostHandleEvent(nsIPresContext& aPresContext,
|
|||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
|
||||
case NS_MOUSE_RIGHT_BUTTON_DOWN:
|
||||
if (nsnull != aEvent->widget) {
|
||||
aEvent->widget->SetFocus();
|
||||
}
|
||||
//Break left out on purpose
|
||||
case NS_MOUSE_LEFT_BUTTON_UP:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_UP:
|
||||
case NS_MOUSE_RIGHT_BUTTON_UP:
|
||||
|
@ -126,6 +130,12 @@ nsEventStateManager::PostHandleEvent(nsIPresContext& aPresContext,
|
|||
ShiftFocus();
|
||||
aStatus = nsEventStatus_eConsumeNoDefault;
|
||||
break;
|
||||
case NS_VK_PAGE_DOWN:
|
||||
case NS_VK_PAGE_UP:
|
||||
break;
|
||||
case NS_VK_DOWN:
|
||||
case NS_VK_UP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -662,17 +662,6 @@ NS_IMETHODIMP nsScrollingView :: HandleEvent(nsGUIEvent *aEvent, PRUint32 aEvent
|
|||
|
||||
switch (aEvent->message)
|
||||
{
|
||||
case NS_MOUSE_LEFT_BUTTON_DOWN:
|
||||
case NS_MOUSE_MIDDLE_BUTTON_DOWN:
|
||||
case NS_MOUSE_RIGHT_BUTTON_DOWN:
|
||||
GetWidget(win);
|
||||
if (nsnull != win)
|
||||
{
|
||||
win->SetFocus();
|
||||
NS_RELEASE(win);
|
||||
}
|
||||
break;
|
||||
|
||||
case NS_KEY_DOWN:
|
||||
{
|
||||
nsKeyEvent * keyEvent = (nsKeyEvent *)aEvent;
|
||||
|
|
Загрузка…
Ссылка в новой задаче