Skip to content

Commit

Permalink
Fallback to default cursor when focused client never set cursor shape
Browse files Browse the repository at this point in the history
  • Loading branch information
wineee authored and zccrs committed Oct 30, 2024
1 parent b4555c1 commit f1cb08e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/server/kernel/wseat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,12 @@ WGlobal::CursorShape WSeat::requestedCursorShape() const
{
W_DC(WSeat);

if (d->cursorClient == d->nativeHandle()->pointer_state.focused_client)
return d->cursorShape;
return WGlobal::CursorShape::Invalid;
if (d->cursorClient != d->nativeHandle()->pointer_state.focused_client) {
qCritical("Focused client never set cursor shape nor surface, will fallback to `Default`");
return WGlobal::CursorShape::Default;
}

return d->cursorShape;
}

WSurface *WSeat::requestedCursorSurface() const
Expand Down

0 comments on commit f1cb08e

Please sign in to comment.