Merge pull request #3985 from Cacodemon345/qt-win32-rawinput

Mouse capturing now works on secondary monitors
This commit is contained in:
Miran Grča
2024-01-02 19:20:27 +01:00
committed by GitHub

View File

@@ -144,7 +144,7 @@ int ignoreNextMouseEvent = 1;
void
RendererStack::mouseReleaseEvent(QMouseEvent *event)
{
if (!dopause && this->geometry().contains(event->pos()) &&
if (!dopause && this->geometry().contains(m_monitor_index >= 1 ? event->globalPos() : event->pos()) &&
(event->button() == Qt::LeftButton) && !mouse_capture &&
(isMouseDown & 1) && (kbd_req_capture || (mouse_get_buttons() != 0)) &&
(mouse_input_mode == 0)) {