Bug 1614465 - Revert mistakenly landed changes to SystemStatusBar.cpp

CLOSED TREE
This commit is contained in:
Mihai Alexandru Michis 2020-10-21 23:58:34 +03:00
Родитель 14606fb8f8
Коммит b7f94b30ea
1 изменённых файлов: 2 добавлений и 5 удалений

Просмотреть файл

@ -208,10 +208,6 @@ LRESULT StatusBarEntry::OnMessage(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
return TRUE; return TRUE;
} }
double scale = GetDesktopToDeviceScale().scale;
int32_t x = NSToIntRound(GET_X_LPARAM(wp) * scale);
int32_t y = NSToIntRound(GET_Y_LPARAM(wp) * scale);
// The menu that is being opened is a Gecko <xul:menu>, and the popup code // The menu that is being opened is a Gecko <xul:menu>, and the popup code
// that manages it expects that the window that the <xul:menu> belongs to // that manages it expects that the window that the <xul:menu> belongs to
// will be in the foreground when it opens. If we don't do this, then if the // will be in the foreground when it opens. If we don't do this, then if the
@ -221,7 +217,8 @@ LRESULT StatusBarEntry::OnMessage(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
// focuses any window in the parent process). // focuses any window in the parent process).
::SetForegroundWindow(win); ::SetForegroundWindow(win);
nsXULPopupManager* pm = nsXULPopupManager::GetInstance(); nsXULPopupManager* pm = nsXULPopupManager::GetInstance();
pm->ShowPopupAtScreen(popupFrame->GetContent(), x, y, false, nullptr); pm->ShowPopupAtScreen(popupFrame->GetContent(), GET_X_LPARAM(wp),
GET_Y_LPARAM(wp), false, nullptr);
} }
return DefWindowProc(hWnd, msg, wp, lp); return DefWindowProc(hWnd, msg, wp, lp);