resize_handler
This commit is contained in:
parent
e03f2bbe08
commit
df4fe38c66
11
layout.lua
11
layout.lua
|
@ -1,5 +1,6 @@
|
|||
local api = {
|
||||
screen = screen,
|
||||
awful = require("awful"),
|
||||
}
|
||||
|
||||
local function min(a, b)
|
||||
|
@ -14,6 +15,12 @@ local function get_screen(s)
|
|||
return s and api.screen[s]
|
||||
end
|
||||
|
||||
api.awful.mouse.resize.add_enter_callback(
|
||||
function (c)
|
||||
c.width_before_move = c.width
|
||||
c.height_before_move = c.height
|
||||
end, 'mouse.move')
|
||||
|
||||
--- find the best region for the area-like object
|
||||
-- @param c area-like object - table with properties x, y, width, and height
|
||||
-- @param regions array of area-like objects
|
||||
|
@ -199,8 +206,8 @@ local function create(name, editor)
|
|||
local hh = {}
|
||||
hh.x = regions[lu].x
|
||||
hh.y = regions[lu].y
|
||||
hh.width = h.width
|
||||
hh.height = h.height
|
||||
hh.width = c.width_before_move
|
||||
hh.height = c.height_before_move
|
||||
rd = find_rd(hh, regions, lu)
|
||||
else
|
||||
rd = find_rd(h, regions, lu)
|
||||
|
|
Loading…
Reference in New Issue