Skip to content

Qt6 Wayland workaround is not properly handling the height of nativeCursorRect #60

@lhy7889678

Description

@lhy7889678

if (!nativeCursorRect.intersects(windowGeometry)) {
if (nativeCursorRect.right() < windowGeometry.left()) {
nativeCursorRect.setLeft(windowGeometry.left());
nativeCursorRect.setWidth(1);
}
if (nativeCursorRect.left() > windowGeometry.right()) {
nativeCursorRect.setLeft(windowGeometry.right());
nativeCursorRect.setWidth(1);
}
if (nativeCursorRect.bottom() < windowGeometry.top()) {
nativeCursorRect.setTop(windowGeometry.top());
nativeCursorRect.setWidth(1);
}
if (nativeCursorRect.top() > windowGeometry.bottom()) {
nativeCursorRect.setTop(windowGeometry.bottom());
nativeCursorRect.setWidth(1);
}
}

I think the 3rd & 4th setWidth should be changed to setHeight. Otherwise, the height is possibly set to zero, causing the crash of LibreOffice bug 160275.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions