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
This commit is contained in:
Emmanuel Lepage Vallée 2019-07-10 17:16:41 -04:00 committed by GitHub
parent b795671817
commit c89c18c989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -14,6 +14,7 @@ local beautiful = require("beautiful")
local color = require("gears.color") local color = require("gears.color")
local shape = require("gears.shape") local shape = require("gears.shape")
local cairo = require("lgi").cairo local cairo = require("lgi").cairo
local alayout = require("awful.layout")
local capi = { local capi = {
root = root, root = root,
@ -104,6 +105,10 @@ end
local current_snap, current_axis = nil local current_snap, current_axis = nil
local function detect_areasnap(c, distance) 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 old_snap = current_snap
local v, h = detect_screen_edges(c, distance) local v, h = detect_screen_edges(c, distance)