-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting cursor_grab every frame on wayland leads to issues #3566
Labels
Comments
That sounds like a bug in your compositor, works just fine in mine. Could you test something like that diff --git a/src/platform_impl/linux/wayland/window/state.rs b/src/platform_impl/linux/wayland/window/state.rs
index a00ddb52..85e4c48d 100644
--- a/src/platform_impl/linux/wayland/window/state.rs
+++ b/src/platform_impl/linux/wayland/window/state.rs
@@ -826,6 +826,10 @@ impl WindowState {
/// Set the cursor grabbing state on the top-level.
pub fn set_cursor_grab(&mut self, mode: CursorGrabMode) -> Result<(), ExternalError> {
+ if self.cursor_grab_mode.user_grab_mode == mode {
+ return Ok(());
+ }
+
// Replace the user grabbing mode.
self.cursor_grab_mode.user_grab_mode = mode;
self.set_cursor_grab_inner(mode)
|
Sadly i don't have a winit build environment set up but it does sound like a compositor bug |
kchibisov
added a commit
that referenced
this issue
Mar 5, 2024
Some compositors break when re-taking the same grab. Closes: #3566
5 tasks
kchibisov
added a commit
that referenced
this issue
Mar 5, 2024
Some compositors break when re-taking the same grab. Closes: #3566
kchibisov
added a commit
that referenced
this issue
Mar 5, 2024
Some compositors break when re-taking the same grab. Closes: #3566
kchibisov
added a commit
that referenced
this issue
Mar 5, 2024
Some compositors break when re-taking the same grab. Closes: #3566
kchibisov
added a commit
that referenced
this issue
Mar 6, 2024
Some compositors break when re-taking the same grab. Closes: #3566
notgull
pushed a commit
that referenced
this issue
Mar 7, 2024
Some compositors break when re-taking the same grab. Closes: #3566
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Calling set_cursor_grab every frame on wayland (even with the same Mode every time) leads to it not working properly, but setting it once works
The text was updated successfully, but these errors were encountered: