MCPcopy Create free account
hub / github.com/Sonic-DE/sonic-win / CursorImage

Method CursorImage

src/pointer_input.cpp:748–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

746}
747
748CursorImage::CursorImage(PointerInputRedirection *parent)
749 : QObject(parent)
750 , m_pointer(parent)
751{
752 m_effectsCursor = std::make_unique<ShapeCursorSource>();
753 m_fallbackCursor = std::make_unique<ShapeCursorSource>();
754 m_moveResizeCursor = std::make_unique<ShapeCursorSource>();
755 m_windowSelectionCursor = std::make_unique<ShapeCursorSource>();
756 m_decoration.cursor = std::make_unique<ShapeCursorSource>();
757
758#if KWIN_BUILD_SCREENLOCKER
759 if (kwinApp()->supportsLockScreen()) {
760 connect(ScreenLocker::KSldApp::self(), &ScreenLocker::KSldApp::lockStateChanged, this, &CursorImage::reevaluteSource);
761 }
762#endif
763 connect(m_pointer, &PointerInputRedirection::decorationChanged, this, &CursorImage::updateDecoration);
764 // connect the move resize of all window
765 auto setupMoveResizeConnection = [this](Window *window) {
766 connect(window, &Window::moveResizedChanged, this, &CursorImage::updateMoveResize);
767 connect(window, &Window::moveResizeCursorChanged, this, &CursorImage::updateMoveResize);
768 };
769 const auto clients = workspace()->windows();
770 std::for_each(clients.begin(), clients.end(), setupMoveResizeConnection);
771 connect(workspace(), &Workspace::windowAdded, this, setupMoveResizeConnection);
772
773 m_fallbackCursor->setShape(Qt::ArrowCursor);
774
775 reevaluteSource();
776}
777
778CursorImage::~CursorImage() = default;
779

Callers

nothing calls this directly

Calls 8

kwinAppFunction · 0.85
selfFunction · 0.85
workspaceFunction · 0.85
supportsLockScreenMethod · 0.80
beginMethod · 0.80
windowsMethod · 0.45
endMethod · 0.45
setShapeMethod · 0.45

Tested by

no test coverage detected