зеркало из https://github.com/mozilla/pjs.git
Still trying to fix mac builds, bug Bug 354694
This commit is contained in:
Родитель
03ba708884
Коммит
856531509c
|
@ -1523,9 +1523,9 @@ PRBool nsMacEventHandler::HandleMouseDownEvent(EventRecord& aOSEvent)
|
||||||
{
|
{
|
||||||
// set the activation and focus on the widget hit, if it accepts it
|
// set the activation and focus on the widget hit, if it accepts it
|
||||||
{
|
{
|
||||||
nsMouseEvent mouseActivateEvent(PR_TRUE, 0, nsnull,
|
nsMouseEvent mouseActivateEvent(PR_TRUE, NS_MOUSE_ACTIVATE, nsnull,
|
||||||
nsMouseEvent::eReal);
|
nsMouseEvent::eReal);
|
||||||
ConvertOSEventToMouseEvent(aOSEvent, mouseActivateEvent, NS_MOUSE_ACTIVATE);
|
ConvertOSEventToMouseEvent(aOSEvent, mouseActivateEvent);
|
||||||
widgetHit->DispatchMouseEvent(mouseActivateEvent);
|
widgetHit->DispatchMouseEvent(mouseActivateEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1535,9 +1535,9 @@ PRBool nsMacEventHandler::HandleMouseDownEvent(EventRecord& aOSEvent)
|
||||||
// if we're a control-click, send in an additional NS_CONTEXTMENU event
|
// if we're a control-click, send in an additional NS_CONTEXTMENU event
|
||||||
// after the mouse down.
|
// after the mouse down.
|
||||||
if (mouseEvent.button == nsMouseEvent::eRightButton) {
|
if (mouseEvent.button == nsMouseEvent::eRightButton) {
|
||||||
nsMouseEvent contextMenuEvent(PR_TRUE, 0, nsnull,
|
nsMouseEvent contextMenuEvent(PR_TRUE, NS_CONTEXTMENU, nsnull,
|
||||||
nsMouseEvent::eReal);
|
nsMouseEvent::eReal);
|
||||||
ConvertOSEventToMouseEvent(aOSEvent, contextMenuEvent, NS_CONTEXTMENU);
|
ConvertOSEventToMouseEvent(aOSEvent, contextMenuEvent);
|
||||||
contextMenuEvent.isControl = PR_FALSE;
|
contextMenuEvent.isControl = PR_FALSE;
|
||||||
widgetHit->DispatchMouseEvent(contextMenuEvent);
|
widgetHit->DispatchMouseEvent(contextMenuEvent);
|
||||||
}
|
}
|
||||||
|
@ -1595,7 +1595,7 @@ PRBool nsMacEventHandler::HandleMouseUpEvent(
|
||||||
if ( aOSEvent.message == kEventMouseButtonTertiary )
|
if ( aOSEvent.message == kEventMouseButtonTertiary )
|
||||||
mouseEvent.button = nsMouseEvent::eMiddleButton;
|
mouseEvent.button = nsMouseEvent::eMiddleButton;
|
||||||
|
|
||||||
ConvertOSEventToMouseEvent(aOSEvent, mouseEvent, mouseButton);
|
ConvertOSEventToMouseEvent(aOSEvent, mouseEvent);
|
||||||
|
|
||||||
nsWindow* widgetReleased = (nsWindow*)mouseEvent.widget;
|
nsWindow* widgetReleased = (nsWindow*)mouseEvent.widget;
|
||||||
nsWindow* widgetHit = mEventDispatchHandler->GetWidgetHit();
|
nsWindow* widgetHit = mEventDispatchHandler->GetWidgetHit();
|
||||||
|
@ -1639,8 +1639,8 @@ PRBool nsMacEventHandler::HandleMouseMoveEvent( EventRecord& aOSEvent )
|
||||||
if (!::IsWindowActive(wind) && windowType != eWindowType_popup)
|
if (!::IsWindowActive(wind) && windowType != eWindowType_popup)
|
||||||
return retVal;
|
return retVal;
|
||||||
|
|
||||||
nsMouseEvent mouseEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
|
nsMouseEvent mouseEvent(PR_TRUE, NS_MOUSE_MOVE, nsnull, nsMouseEvent::eReal);
|
||||||
ConvertOSEventToMouseEvent(aOSEvent, mouseEvent, NS_MOUSE_MOVE);
|
ConvertOSEventToMouseEvent(aOSEvent, mouseEvent);
|
||||||
if (lastWidgetHit)
|
if (lastWidgetHit)
|
||||||
{
|
{
|
||||||
Point macPoint = aOSEvent.where;
|
Point macPoint = aOSEvent.where;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче