Remember the last cursor shape when restoring the cursor.
Remove the condition that returns early when a pointer constraint is
active because it is not necessary now that pointer focus is no longer
cleared.
I didn't call wlr_seat_pointer_notify_enter() while the cursor is hidden
to avoid restoring it, but this is no longer necessary now that
setcursor() and setcursorshape() don't change the cursor while it is
hidden: those calls were what restored the cursor.
By calling wlr_seat_pointer_notify_enter() even when the cursor is
hidden, we no longer have to manually restore pointer focus when the
cursor is restored.
- Backport perinputconfig from main-tracking to v0.5
- It's actually simpler since v0.5 already has the keyboard groups as a
list as opposed to what's in current main
- Array replaced singular variables for configuration
- Pointer: Only applies to enable-state, acceleration profile, and speed
- Keyboard: Basically xkb_rule_names plus name
- Like EX: Rules, requires NULL/default set at the end
Don't clear the pointer focus when hiding the cursor. This was annoying
because if you e.g. had the cursor over a spoiler tag it becomes black
again after the timeout, or if the cursor was opening a popup by
hovering over a button the popup disappears after the timeout.
Not clearing the pointer focus requires adding a check when changing the
cursor image to not make the cursor reappear when it does. Skipping the
image change results in having the old cursor image if it changed while
the cursor was hidden, until it is changed again. Don't keep track of
the last cursor image for simplicity.