awful.mouse: Do not depend on awful.layout.
It was only used to check if its the floating layout, there is a less intrusive dependency to check that.
This commit is contained in:
parent
0d1b34e54a
commit
44cdde57a9
|
@ -7,7 +7,7 @@
|
||||||
---------------------------------------------------------------------------
|
---------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Grab environment we need
|
-- Grab environment we need
|
||||||
local layout = require("awful.layout")
|
local floating = require("awful.layout.suit.floating")
|
||||||
local aplace = require("awful.placement")
|
local aplace = require("awful.placement")
|
||||||
local gdebug = require("gears.debug")
|
local gdebug = require("gears.debug")
|
||||||
local type = type
|
local type = type
|
||||||
|
@ -241,7 +241,7 @@ function mouse.resize_handler(c, context, hints)
|
||||||
local t = c.screen.selected_tag
|
local t = c.screen.selected_tag
|
||||||
local lay = t and t.layout or nil
|
local lay = t and t.layout or nil
|
||||||
|
|
||||||
if (lay and lay == layout.suit.floating) or c.floating then
|
if (lay and lay == floating) or c.floating then
|
||||||
c:geometry {
|
c:geometry {
|
||||||
x = hints.x,
|
x = hints.x,
|
||||||
y = hints.y,
|
y = hints.y,
|
||||||
|
@ -262,9 +262,9 @@ mouse.resize.add_enter_callback(function(c, args) --luacheck: no unused args
|
||||||
if c.floating then return end
|
if c.floating then return end
|
||||||
|
|
||||||
local l = c.screen.selected_tag and c.screen.selected_tag.layout or nil
|
local l = c.screen.selected_tag and c.screen.selected_tag.layout or nil
|
||||||
if l == layout.suit.floating then return end
|
if l == floating then return end
|
||||||
|
|
||||||
if l ~= layout.suit.floating and l.mouse_resize_handler then
|
if l.mouse_resize_handler then
|
||||||
capi.mousegrabber.stop()
|
capi.mousegrabber.stop()
|
||||||
|
|
||||||
local geo, corner = aplace.closest_corner(capi.mouse, {parent=c})
|
local geo, corner = aplace.closest_corner(capi.mouse, {parent=c})
|
||||||
|
|
Loading…
Reference in New Issue