From d43e1170d1092812111521f2daa426497f7dc9e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 2 Mar 2016 03:49:18 -0500 Subject: [PATCH] context: Fix some regressions --- placement.lua | 6 +++--- smart_wibox.lua | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/placement.lua b/placement.lua index c3864e0..4e7d34c 100644 --- a/placement.lua +++ b/placement.lua @@ -132,7 +132,7 @@ function module.get_relative_points(geo, mode) left = {x = dgeo.x , y = center_point.y }, right = {x = dgeo.x + dgeo.width , y = center_point.y }, top = {x = center_point.x , y = dgeo.y }, - bottom = {x = center_point.y , y = dgeo.y + dgeo.height }, + bottom = {x = center_point.x , y = dgeo.y + dgeo.height }, } local s = geo.drawable.screen or screen.getbycoord( @@ -188,7 +188,7 @@ function module.move_relative(d, points, preferred_positions) end -- No need to continue - if preferred_positions[k] == 1 then break end + if fit and preferred_positions[k] == 1 then break end end local pos_name = pref_name or next(does_fit) @@ -202,4 +202,4 @@ function module.move_relative(d, points, preferred_positions) return pos_name end -return module \ No newline at end of file +return module diff --git a/smart_wibox.lua b/smart_wibox.lua index c04c2c1..8a0342a 100644 --- a/smart_wibox.lua +++ b/smart_wibox.lua @@ -165,7 +165,7 @@ end -- @param use_mouse Use the mouse position instead of the widget center as -- reference point. function wb_func:move_by_parent(geo, use_mouse) - local dps = placement.get_relative_points(d, rgeo, mode) + local dps = placement.get_relative_points(geo, mode) rawset(self, "possible_positions", dps) @@ -234,4 +234,4 @@ local function create_auto_resize_widget(self, wdg, args) return w end -return setmetatable(module, {__call = create_auto_resize_widget}) \ No newline at end of file +return setmetatable(module, {__call = create_auto_resize_widget})