Skip to content

Commit

Permalink
fix: reduce size of top snap range
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanabx authored and Drakulix committed Apr 11, 2024
1 parent f83d80d commit f859110
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/shell/grabs/moving.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ pub enum SnappingZone {
}

const SNAP_RANGE: i32 = 32;
const SNAP_RANGE_TOP: i32 = 24;
const SNAP_RANGE_MAXIMIZE: i32 = 22;
const SNAP_RANGE_TOP: i32 = 16;

impl SnappingZone {
pub fn contains(
Expand All @@ -269,8 +270,8 @@ impl SnappingZone {
if !output_geometry.contains(point) {
return false;
}
let top_zone_32 = point.y < output_geometry.loc.y + SNAP_RANGE;
let top_zone_56 = point.y < output_geometry.loc.y + SNAP_RANGE + SNAP_RANGE_TOP;
let top_zone_32 = point.y < output_geometry.loc.y + SNAP_RANGE_MAXIMIZE;
let top_zone_56 = point.y < output_geometry.loc.y + SNAP_RANGE_MAXIMIZE + SNAP_RANGE_TOP;
let left_zone = point.x < output_geometry.loc.x + SNAP_RANGE;
let right_zone = point.x > output_geometry.loc.x + output_geometry.size.w - SNAP_RANGE;
let bottom_zone = point.y > output_geometry.loc.y + output_geometry.size.h - SNAP_RANGE;
Expand Down

0 comments on commit f859110

Please sign in to comment.