зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1219215 - part 0: fix context menu code to take window dragging region into account, r=jimm
--HG-- extra : commitid : DiCsOzFXOc6 extra : rebase_source : 2feea836b779b237d2da9f5f2e966ed3c6c37d4b
This commit is contained in:
Родитель
77d52c0a79
Коммит
652ed2993f
|
@ -5228,13 +5228,19 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam,
|
|||
WidgetMouseEvent::eRightButton,
|
||||
MOUSE_INPUT_SOURCE());
|
||||
if (lParam != -1 && !result && mCustomNonClient) {
|
||||
WidgetMouseEvent event(true, eMouseHitTest, this,
|
||||
WidgetMouseEvent::eReal,
|
||||
WidgetMouseEvent::eNormal);
|
||||
event.refPoint = LayoutDeviceIntPoint(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
|
||||
event.inputSource = MOUSE_INPUT_SOURCE();
|
||||
event.mFlags.mOnlyChromeDispatch = true;
|
||||
if (DispatchWindowEvent(&event)) {
|
||||
bool shouldShowMenu = false;
|
||||
if (mDraggableRegion.Contains(GET_X_LPARAM(pos), GET_Y_LPARAM(pos))) {
|
||||
shouldShowMenu = true;
|
||||
} else {
|
||||
WidgetMouseEvent event(true, eMouseHitTest, this,
|
||||
WidgetMouseEvent::eReal,
|
||||
WidgetMouseEvent::eNormal);
|
||||
event.refPoint = LayoutDeviceIntPoint(GET_X_LPARAM(pos), GET_Y_LPARAM(pos));
|
||||
event.inputSource = MOUSE_INPUT_SOURCE();
|
||||
event.mFlags.mOnlyChromeDispatch = true;
|
||||
shouldShowMenu = DispatchWindowEvent(&event);
|
||||
}
|
||||
if (shouldShowMenu) {
|
||||
// Blank area hit, throw up the system menu.
|
||||
DisplaySystemMenu(mWnd, mSizeMode, mIsRTL, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
|
||||
result = true;
|
||||
|
|
Загрузка…
Ссылка в новой задаче