summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Makhov <pmakhov@theoctavegroup.com>2019-10-03 22:59:40 -0400
committerPavel Makhov <pmakhov@theoctavegroup.com>2019-10-03 22:59:40 -0400
commit0ec62ab51e5e8b7c9e9a8f4ea2a43394252a22e7 (patch)
tree93cceca9a950714b9d6fb81ef22ea5a63ccac5d6
parent79e22c694062d99f96a0746ffdb81823002745e8 (diff)
gerrit widget - place popup close to the parent widget
-rw-r--r--gerrit-widget/gerrit.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/gerrit-widget/gerrit.lua b/gerrit-widget/gerrit.lua
index a9a3ca1..5649e79 100644
--- a/gerrit-widget/gerrit.lua
+++ b/gerrit-widget/gerrit.lua
@@ -170,8 +170,11 @@ local function worker(args)
awful.util.table.join(
awful.button({}, 1, function()
gerrit_widget:set_unseen_review(false)
- awful.placement.top_right(popup, { margins = { top = 25, right = 10}, parent = awful.screen.focused() })
- popup.visible = not popup.visible
+ if popup.visible then
+ popup.visible = not popup.visible
+ else
+ popup:move_next_to(mouse.current_widget_geometry)
+ end
end)
)
)