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

Add an option to skip moving the pointer away during cycling #36

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 5 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ cyclefocus = {
-- can use when overriding this with a function (that gets the client as
-- argument).
raise_client = true,
-- Should the mouse pointer be moved away during cycling?
-- This is normally done to avoid interference from sloppy focus handling,
-- but can be disabled if you do not use sloppy focus.
move_mouse_pointer = true,

-- How many entries should get displayed before and after the current one?
display_next_count = 3,
Expand Down Expand Up @@ -890,7 +894,7 @@ cyclefocus.cycle = function(startdirection_or_args, args)

-- Move mouse pointer away to avoid sloppy focus kicking in.
local restore_mouse_coords
if show_clients then
if show_clients and args.move_mouse_pointer then
local s = capi.screen[capi.mouse.screen]
local coords = capi.mouse.coords()
restore_mouse_coords = {s = s, x = coords.x, y = coords.y}
Expand Down