Skip to content

Commit

Permalink
Apply pointer_follows_focus option only if it was modified
Browse files Browse the repository at this point in the history
This prevents pointer being centered on a node when the option is configured.
It helps in case when xbanish only enables pointer following focus when the pointer
is invisible. Which is needed to prevent 'caging' pointer on some modal dialog
windows.
  • Loading branch information
Dmitry Lavnikevich committed Jun 20, 2019
1 parent 32b7fd9 commit 5657926
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/messages.c
Original file line number Diff line number Diff line change
Expand Up @@ -1698,14 +1698,22 @@ void set_setting(coordinates_t loc, char *name, char *value, FILE *rsp)
SET_BOOL(borderless_monocle)
SET_BOOL(gapless_monocle)
SET_BOOL(swallow_first_click)
SET_BOOL(pointer_follows_focus)
SET_BOOL(pointer_follows_monitor)
SET_BOOL(ignore_ewmh_focus)
SET_BOOL(ignore_ewmh_struts)
SET_BOOL(center_pseudo_tiled)
SET_BOOL(honor_size_hints)
SET_BOOL(removal_adjustment)
#undef SET_BOOL
} else if (streq("pointer_follows_focus", name)) {
bool pff = pointer_follows_focus;
if (!parse_bool(value, &pointer_follows_focus)) {
fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
return;
}
if (pff == pointer_follows_focus) {
return;
}
#define SET_MON_BOOL(s) \
} else if (streq(#s, name)) { \
if (!parse_bool(value, &s)) { \
Expand Down

0 comments on commit 5657926

Please sign in to comment.