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

Fix conversion from u32 to c_int #2919

Closed
Changes from 1 commit
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
Prev Previous commit
Next Next commit
minor fix
  • Loading branch information
Selene-Amanita committed Jul 2, 2023
commit 7df129f4a1b8ae19ec8f121497d6cd4606949d69
24 changes: 12 additions & 12 deletions src/platform_impl/linux/x11/util/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@
pub fn set_position(&mut self, position: Option<(i32, i32)>) {
if let Some((x, y)) = position {
self.size_hints.flags |= ffi::PPosition;
self.size_hints.x = to_c_int(x);
self.size_hints.y = to_c_int(y);
self.size_hints.x = Self::to_c_int(x);

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 206 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types
self.size_hints.y = Self::to_c_int(y);

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (1.64.0, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (stable, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, i686-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, x86_64-unknown-linux-gnu, ubuntu-latest)

mismatched types

Check failure on line 207 in src/platform_impl/linux/x11/util/hint.rs

View workflow job for this annotation

GitHub Actions / Tests (nightly, x86_64-unknown-linux-gnu, ubuntu-latest, --no-default-features, x11)

mismatched types
} else {
self.size_hints.flags &= !ffi::PPosition;
}
Expand All @@ -214,8 +214,8 @@
pub fn set_size(&mut self, size: Option<(u32, u32)>) {
if let Some((width, height)) = size {
self.size_hints.flags |= ffi::PSize;
self.size_hints.width = to_c_int(width);
self.size_hints.height = to_c_int(height);
self.size_hints.width = Self::to_c_int(width);
self.size_hints.height = Self::to_c_int(height);
} else {
self.size_hints.flags &= !ffi::PSize;
}
Expand All @@ -224,8 +224,8 @@
pub fn set_max_size(&mut self, max_size: Option<(u32, u32)>) {
if let Some((max_width, max_height)) = max_size {
self.size_hints.flags |= ffi::PMaxSize;
self.size_hints.max_width = to_c_int(max_width);
self.size_hints.max_height = to_c_int(max_height);
self.size_hints.max_width = Self::to_c_int(max_width);
self.size_hints.max_height = Self::to_c_int(max_height);
} else {
self.size_hints.flags &= !ffi::PMaxSize;
}
Expand All @@ -234,8 +234,8 @@
pub fn set_min_size(&mut self, min_size: Option<(u32, u32)>) {
if let Some((min_width, min_height)) = min_size {
self.size_hints.flags |= ffi::PMinSize;
self.size_hints.min_width = to_c_int(min_width);
self.size_hints.min_height = to_c_int(min_height);
self.size_hints.min_width = Self::to_c_int(min_width);
self.size_hints.min_height = Self::to_c_int(min_height);
} else {
self.size_hints.flags &= !ffi::PMinSize;
}
Expand All @@ -244,8 +244,8 @@
pub fn set_resize_increments(&mut self, resize_increments: Option<(u32, u32)>) {
if let Some((width_inc, height_inc)) = resize_increments {
self.size_hints.flags |= ffi::PResizeInc;
self.size_hints.width_inc = to_c_int(width_inc);
self.size_hints.height_inc = to_c_int(height_inc);
self.size_hints.width_inc = Self::to_c_int(width_inc);
self.size_hints.height_inc = Self::to_c_int(height_inc);
} else {
self.size_hints.flags &= !ffi::PResizeInc;
}
Expand All @@ -254,8 +254,8 @@
pub fn set_base_size(&mut self, base_size: Option<(u32, u32)>) {
if let Some((base_width, base_height)) = base_size {
self.size_hints.flags |= ffi::PBaseSize;
self.size_hints.base_width = to_c_int(base_width);
self.size_hints.base_height = to_c_int(base_height);
self.size_hints.base_width = Self::to_c_int(base_width);
self.size_hints.base_height = Self::to_c_int(base_height);
} else {
self.size_hints.flags &= !ffi::PBaseSize;
}
Expand Down
Loading