Skip to content
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

Remove arbitrary sleep #25

Open
expectocode opened this issue Apr 5, 2020 · 2 comments
Open

Remove arbitrary sleep #25

expectocode opened this issue Apr 5, 2020 · 2 comments

Comments

@expectocode
Copy link
Member

Once get_window_at_point can take an ignore_window parameter, as #22 adds, we could get the window geometry of the window below the cursor before destroying our own geometry and we could remove the arbitrary 40ms sleep after our unmapping (which was for waiting for our own window to disappear, I think).

@Lonami
Copy link
Member

Lonami commented Apr 5, 2020

For the record, we're talking about this one:

std::thread::sleep(std::time::Duration::from_millis(40));

I presume we still want to keep this one, although it could use a comment:

hacksaw/src/lib/mod.rs

Lines 132 to 136 in 0845862

if reply.status() as u32 == xcb::GRAB_STATUS_SUCCESS {
return true;
} else if i < CURSOR_GRAB_TRIES - 1 {
std::thread::sleep(std::time::Duration::from_millis(100));
}

@expectocode
Copy link
Member Author

expectocode commented Apr 5, 2020

yes indeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants