diff options
author | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-10-03 22:59:40 -0400 |
---|---|---|
committer | Pavel Makhov <pmakhov@theoctavegroup.com> | 2019-10-03 22:59:40 -0400 |
commit | 0ec62ab51e5e8b7c9e9a8f4ea2a43394252a22e7 (patch) | |
tree | 93cceca9a950714b9d6fb81ef22ea5a63ccac5d6 /gerrit-widget | |
parent | 79e22c694062d99f96a0746ffdb81823002745e8 (diff) |
gerrit widget - place popup close to the parent widget
Diffstat (limited to 'gerrit-widget')
-rw-r--r-- | gerrit-widget/gerrit.lua | 7 |
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) ) ) |