From caf862fc843c89cceae2121f743a3822e09bbd46 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 27 May 2022 23:36:20 +0200 Subject: [PATCH] tdf#149329 Qt change cursor via QWidget ... instead of its QWindow No idea, why my initial implementation used the QWindow. Neither do I know, why it's now somehow broken. The code is called, but the cursor doesn't change. But it seems to work via QWidget, so just do that. IMHO less QWindow is preferable generally; let Qt handle more of the low-level stuff. Change-Id: Id23fba719c9a4d7e760991c51e6021c6f89be345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135051 Reviewed-by: Michael Weghorn Reviewed-by: Jan-Marek Glogowski Tested-by: Jenkins --- vcl/qt5/QtFrame.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx index 0933bf33b029..4b94273e1cff 100644 --- a/vcl/qt5/QtFrame.cxx +++ b/vcl/qt5/QtFrame.cxx @@ -835,14 +835,11 @@ void QtFrame::ToTop(SalFrameToTop nFlags) void QtFrame::SetPointer(PointerStyle ePointerStyle) { - QWindow* pWindow = m_pQWidget->window()->windowHandle(); - if (!pWindow) - return; if (ePointerStyle == m_ePointerStyle) return; m_ePointerStyle = ePointerStyle; - pWindow->setCursor(GetQtData()->getCursor(ePointerStyle)); + m_pQWidget->setCursor(GetQtData()->getCursor(ePointerStyle)); } void QtFrame::CaptureMouse(bool bMouse)