vcl/qt5/QtFrame.cxx |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 8e92328c3f7d93810f0b40bafb62b981d8e98f9f
Author:     Jan-Marek Glogowski <[email protected]>
AuthorDate: Fri May 27 23:36:20 2022 +0200
Commit:     Michael Weghorn <[email protected]>
CommitDate: Sat May 28 20:32:38 2022 +0200

    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 <[email protected]>
    Reviewed-by: Jan-Marek Glogowski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit caf862fc843c89cceae2121f743a3822e09bbd46)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135080

diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index b9a5f40bea91..8af59966dcd7 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -819,14 +819,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(static_cast<QtData*>(GetSalData())->getCursor(ePointerStyle));
+    
m_pQWidget->setCursor(static_cast<QtData*>(GetSalData())->getCursor(ePointerStyle));
 }
 
 void QtFrame::CaptureMouse(bool bMouse)

Reply via email to