UI/Qt: Do not multiply window position/size by the device pixel ratio

On macOS, this is resulting in values of window.screenX, window.screenY,
window.outerWidth and window.outerHeight that are 2x larger than Safari,
Firefox, and our AppKit UI.
This commit is contained in:
Timothy Flynn 2024-10-28 11:51:28 -04:00 committed by Tim Ledbetter
commit 54f6db01af
Notes: github-actions[bot] 2024-10-29 11:05:04 +00:00

View file

@ -1168,7 +1168,7 @@ void BrowserWindow::resizeEvent(QResizeEvent* event)
QWidget::resizeEvent(event);
for_each_tab([&](auto& tab) {
tab.view().set_window_size({ frameSize().width() * m_device_pixel_ratio, frameSize().height() * m_device_pixel_ratio });
tab.view().set_window_size({ frameSize().width(), frameSize().height() });
});
}
@ -1177,7 +1177,7 @@ void BrowserWindow::moveEvent(QMoveEvent* event)
QWidget::moveEvent(event);
for_each_tab([&](auto& tab) {
tab.view().set_window_position({ event->pos().x() * m_device_pixel_ratio, event->pos().y() * m_device_pixel_ratio });
tab.view().set_window_position({ event->pos().x(), event->pos().y() });
});
}