kms/cursor-manager: Get current cursor position later
Specifically, only after checking crtc_state_impl->cursor_invalidated. If that's false, we bail anyway, so no point getting the current cursor position, which can get blocked by another thread holding the seat_impl->state_lock in writer mode. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4377>
This commit is contained in:
parent
d7c164e1d7
commit
c77d89a9f1
@ -327,9 +327,6 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
|
||||
|
||||
g_assert (old_buffer && !*old_buffer);
|
||||
|
||||
if (!get_current_cursor_position (cursor_manager_impl, &x, &y))
|
||||
return update;
|
||||
|
||||
crtc_state_impl = find_crtc_state (cursor_manager_impl, crtc);
|
||||
g_return_val_if_fail (crtc_state_impl, update);
|
||||
|
||||
@ -340,6 +337,9 @@ maybe_update_cursor_plane (MetaKmsCursorManagerImpl *cursor_manager_impl,
|
||||
if (!crtc_state_impl->cursor_invalidated)
|
||||
return update;
|
||||
|
||||
if (!get_current_cursor_position (cursor_manager_impl, &x, &y))
|
||||
return update;
|
||||
|
||||
device = meta_kms_crtc_get_device (crtc_state_impl->crtc);
|
||||
buffer = crtc_state_impl->buffer;
|
||||
hotspot = &crtc_state_impl->hotspot;
|
||||
|
Loading…
x
Reference in New Issue
Block a user