Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Speed up window switching timers #3237

Merged
merged 4 commits into from
Mar 6, 2023
Merged
Changes from 2 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
6 changes: 3 additions & 3 deletions extensions/window/window_switcher.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ local function exit(self)
-- if windows[selected]:application():bundleID()~='com.apple.finder' then
-- windows[selected]:focus()
-- else
timer.doAfter(0.15,function()windows[selected]:focus()end) -- el cap bugs out (desktop "floats" on top) if done directly
function()windows[selected]:focus()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(E011) expected identifier near '('

-- end
end

local MODS_INTERVAL=0.05 -- recheck for (lack of) mod keys after this interval
local MODS_INTERVAL=0.01 -- recheck for (lack of) mod keys after this interval
local function modsPressed() return checkMods(true)._raw>0 end
local function show(self,dir)
local windows,drawings,ui=self.windows,self.drawings,self.ui
Expand Down Expand Up @@ -258,7 +258,7 @@ local function show(self,dir)
setFrames(nwindows,drawings,ui)
drawings.lastn=nwindows
end
self.drawDelayed=timer.doAfter(0.2,function()
self.drawDelayed=timer.doAfter(0.15,function()
draw(windows,drawings,ui)
end)
self.modsTimer=timer.waitWhile(modsPressed,function()exit(self)end,MODS_INTERVAL)
Expand Down