Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- FAQ Section in README
- xinput2: XIMaskLen macro translation

### Changed

Expand Down
4 changes: 4 additions & 0 deletions src/xinput2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ pub fn XIMaskIsSet(mask: &[::std::os::raw::c_uchar], event: i32) -> bool {
(mask[mask_byte(event)] & (1 << (event & 7))) != 0
}

pub fn XIMaskLen(event: i32) -> usize {
mask_byte(event) + 1
}

//
// functions
//
Expand Down
8 changes: 4 additions & 4 deletions x11-dl/src/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ impl DynamicLibrary {
}

impl Drop for DynamicLibrary {
fn drop (&mut self) {
unsafe {
libc::dlclose(self.handle as *mut _);
fn drop(&mut self) {
unsafe {
libc::dlclose(self.handle as *mut _);
}
}
}
}

unsafe impl Send for DynamicLibrary {}
Expand Down