Setting cursor position on same frame as locking cursor fails.
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
The failing call is the window cursor-position update in bevy_winit, which runs in the changed_window and changed_cursor_options systems; the issue suggests their order matters. Read those systems in the bevy_winit crate and reproduce the picking-observer scenario on Linux/Wayland. Done means setting the cursor position and the Locked grab mode in the same frame no longer logs the 'cursor position can be set only for locked cursor' error and the cursor actually moves.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bevy version and features
- Bevy 0.19.1
Relevant system information
- Linux
What you did
// window is Query<(&mut Window, &mut CursorOptions)>
let Ok((mut window, mut cursor)) = window.get_mut(event.entity) else {
return;
};
let mid_position = window.size() * 0.5;
window.set_cursor_position(Some(mid_position));
cursor.grab_mode = CursorGrabMode::Locked;
This is happening in a picking observer (so not at startup).
What went wrong
2026-11-01T19:42:06.399277Z ERROR bevy_winit::system: could not set cursor position: os error at /.../winit-0.30.13/src/platform_impl/linux/wayland/window/state.rs:951: cursor position can be set only for locked cursor.
Setting the grab mode on the same frame as setting the cursor position fails to move the cursor!
Additional information
It might be sufficient to just change the order of the changed_window and changed_cursor_options systems.
- Lenguaje dominante
- Rust
- Estrellas
- 49.7k
- Forks
- 5k
- Merge medio
- 3 d 19 h
- PR fusionados (30 d)
- 134
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bevyengine/bevy
-
C-Bug S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bevyengine/bevy#26536 ·
Los mantenedores suelen responder en 2 días
-
Placeholder has no defaultPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. AbiertoC-Feature S-Needs-Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
bevyengine/bevy#26532 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
C-Feature S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
bevyengine/bevy#26500 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
`Selected` should derive ReflectAbiertoC-Feature S-Needs-Triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
bevyengine/bevy#26499 ·
Los mantenedores suelen responder en 2 días
-
`compute_histogram` in auto exposure writes past the end of the 64-bin histogramPosiblemente ocupada @dev-matru la tomó hace 3 días. AbiertoA-Rendering C-Bug D-Straightforward S-Ready-For-Implementation X-Uncontroversial
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
bevyengine/bevy#26479 ·
Los mantenedores suelen responder en 2 días
Todos los issues de bevyengine/bevy
Issues similares
-
remove the use of `forget`Abiertogood first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
swc-project/swc-ai-issues#907 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
area:helper kind:bug priority:p3 ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
bug UI
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
wardian-app/Wardian#1746 ·
Los mantenedores suelen responder en 1 día