Merge pull request #5608 from Cacodemon345/clipcursor-fixes

Fix cursor clipping on Windows
This commit is contained in:
Miran Grča
2025-05-21 20:21:39 +02:00
committed by GitHub

View File

@@ -663,6 +663,14 @@ RendererStack::setFocusRenderer()
void
RendererStack::onResize(int width, int height)
{
#ifdef Q_OS_WINDOWS
if (mouse_capture) {
RECT rect;
if (GetWindowRect((HWND)this->winId(), &rect)) {
ClipCursor(&rect);
}
}
#endif
if (rendererWindow) {
rendererWindow->r_monitor_index = m_monitor_index;
rendererWindow->onResize(width, height);