Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stackline/stack.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ end -- }}}

function Stack:getWindowByPoint(point) -- {{{
local foundWin = u.filter(self.windows, function(w)
if not w.indicator then return false end
local indicatorEls = w.indicator:canvasElements()
local wFrame = hs.geometry.rect(indicatorEls[1].frame)
return point:inside(wFrame)
Expand Down
5 changes: 5 additions & 0 deletions stackline/stackline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ stackline.window = require 'stackline.stackline.window'
function stackline:init(userConfig) -- {{{
log.i('starting stackline')

if stackline.manager then
-- guard against re-initializtion https://github.com/AdamWagner/stackline/issues/46#issuecomment-723527826
return print('stackline already initialized')
end

-- Default window filter controls what windows hs "sees"
-- Required before initialization
self.wf = wf.new():setOverrideFilter{ -- {{{
Expand Down