DVUI

cursorRequestedFloating

Return the cursor the gui wants or null if mouse is not in gui windows. Client code should cache this if switching the platform's cursor is expensive.

Parameters

#
self:*const Self
*const Self

Source

Implementation

#
pub fn cursorRequestedFloating(self: *const Self) ?dvui.enums.Cursor {
    if (self.capture != null or self.subwindows.windowFor(self.mouse_pt) != self.data().id) {
        // gui owns the cursor if we have mouse capture or if the mouse is above
        // a floating window
        return self.cursorRequested();
    } else {
        // no capture, not above a floating window, so client owns the cursor
        return null;
    }
}