Wayland: Fix crash if mouse connected after init

The cursor theme was only loaded if the chosen seat had a mouse
(wl_pointer) during initialization.  If a mouse was connected only after
glfwInit, there would be no cursor theme but the rest of the cursor
related code assumed one had already been loaded.

This also moves the details of cursor theme loading out into a separate
function to declutter platform init.

Because the original cursor theme loading code checked whether we got
a wl_shm, and because the rest of the code just assumes we have
a wl_shm, initialization will now fail if there isn't one.

Fixes #1450
This commit is contained in:
Camilla Löwy
2022-07-15 13:12:58 +02:00
parent 7cc8b053b8
commit 71be34a6c3
3 changed files with 44 additions and 31 deletions

View File

@@ -187,6 +187,7 @@ video tutorials.
- Philip Rideout
- Eddie Ringle
- Max Risuhin
- Joe Roback
- Jorge Rodriguez
- Jari Ronkainen
- Luca Rood