wayland: change some borrow_mut to borrow, reduce borrow scopes, fix two crashes (#9306)

Release Notes:

- N/A
cfa0fc96f0Luke Jones committed on 3/19/2024, 7:40:09 PM· committed by GitHubparent086f4e6
2 files changedLine totals unavailable