From c89c18c989d8ecea55d46025929a5e488565a5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Lepage=20Vall=C3=A9e?= Date: Wed, 10 Jul 2019 17:16:41 -0400 Subject: [PATCH] mouse: Do not display the snap helpers when a client isn;t floating. (#2818) It is still enabled for floating clients or when the floating layout is used. Fixes #2813 --- lib/awful/mouse/snap.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/awful/mouse/snap.lua b/lib/awful/mouse/snap.lua index b1a115e03..f28dff447 100644 --- a/lib/awful/mouse/snap.lua +++ b/lib/awful/mouse/snap.lua @@ -14,6 +14,7 @@ local beautiful = require("beautiful") local color = require("gears.color") local shape = require("gears.shape") local cairo = require("lgi").cairo +local alayout = require("awful.layout") local capi = { root = root, @@ -104,6 +105,10 @@ end local current_snap, current_axis = nil local function detect_areasnap(c, distance) + if (not c.floating) and alayout.get(c.screen) ~= alayout.suit.floating then + return + end + local old_snap = current_snap local v, h = detect_screen_edges(c, distance)