Use actual floats for logical coordinates

This commit is contained in:
Héctor Ramón Jiménez 2023-11-30 23:40:33 +01:00
parent 9f29aec128
commit 67408311f4
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
12 changed files with 165 additions and 136 deletions

View file

@ -1,5 +1,7 @@
use crate::Point;
/// The position of a window in a given screen.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Position {
/// The platform-specific default position for a new window.
Default,
@ -12,7 +14,7 @@ pub enum Position {
/// position. So if you have decorations enabled and want the window to be
/// at (0, 0) you would have to set the position to
/// `(PADDING_X, PADDING_Y)`.
Specific(i32, i32),
Specific(Point),
}
impl Default for Position {