diff --git a/lib/awful/tooltip.lua b/lib/awful/tooltip.lua index 39aa09101..df0a35db1 100644 --- a/lib/awful/tooltip.lua +++ b/lib/awful/tooltip.lua @@ -124,6 +124,7 @@ local function apply_outside_mode(self) local _, position = a_placement.next_to(w, { geometry = self._private.widget_geometry, preferred_positions = self.preferred_positions, + preferred_anchors = self.preferred_alignments, honor_workarea = true, }) @@ -326,6 +327,18 @@ function tooltip:set_preferred_positions(value) set_geometry(self) end + +function tooltip:get_preferred_alignments() + return self._private.preferred_alignments or + {"front", "back", "middle"} +end + +function tooltip:set_preferred_alignments(value) + self._private.preferred_alignments = value + + set_geometry(self) +end + --- Change displayed text. -- -- @property text