Correctly handle window geometry loc in Focus::under
`Focus::under` replaced code in 4 places, that were inconsistent in how they handled this. This seems to be more correct, in each case.
This commit is contained in:
parent
418954a34b
commit
7cd13ec6a9
1 changed files with 1 additions and 1 deletions
|
|
@ -115,8 +115,8 @@ impl Focus {
|
|||
header_height: i32,
|
||||
location: Point<f64, Logical>,
|
||||
) -> Option<Focus> {
|
||||
let loc = location.to_i32_round::<i32>();
|
||||
let geo = surface.geometry();
|
||||
let loc = location.to_i32_round::<i32>() - geo.loc;
|
||||
if loc.y < 0 && loc.x < 0 {
|
||||
Some(Focus::ResizeTopLeft)
|
||||
} else if loc.y < 0 && loc.x >= geo.size.w {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue