1
0
Fork 0
forked from wry/wry

toplevel-drag: move render logic into toplevel drag

This commit is contained in:
Julian Orth 2024-07-10 20:01:59 +02:00
parent 50b6999b0c
commit ac5a5ca949
3 changed files with 19 additions and 11 deletions

View file

@ -352,6 +352,11 @@ impl CursorUser {
self.pos.get()
}
pub fn position_int(&self) -> (i32, i32) {
let (x, y) = self.pos.get();
(x.round_down(), y.round_down())
}
pub fn set_position(&self, mut x: Fixed, mut y: Fixed) -> (Fixed, Fixed) {
let x_int = x.round_down();
let y_int = y.round_down();