Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix floating snap #3719

Merged
merged 1 commit into from
Oct 22, 2022
Merged
Changes from all commits
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
8 changes: 6 additions & 2 deletions lib/awful/mouse/snap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,9 @@ local function detect_areasnap(c, distance)
current_snap and build_placement(current_snap, current_axis)(c, {
to_percent = 0.5,
honor_workarea = true,
pretend = true
honor_padding = true,
pretend = true,
margins = beautiful.snapper_gap
}) or nil
)

Expand All @@ -147,6 +149,8 @@ local function apply_areasnap(c, args)
return build_placement(current_snap, current_axis)(c,{
to_percent = 0.5,
honor_workarea = true,
honor_padding = true,
margins = beautiful.snapper_gap
})
end

Expand Down Expand Up @@ -217,7 +221,7 @@ function module.snap(c, snap, x, y, fixed_x, fixed_y)
geom.height = geom.height + (2 * c.border_width) + (2 * snapper_gap)

geom, edge = snap_inside(geom, c.screen.geometry, snap)
geom = snap_inside(geom, c.screen.workarea, snap)
geom = snap_inside(geom, c.screen.tiling_area, snap)

-- Allow certain windows to snap to the edge of the workarea.
-- Only allow docking to workarea for consistency/to avoid problems.
Expand Down