diff --git a/keynav.c b/keynav.c index 65abe7c..73c4d5d 100644 --- a/keynav.c +++ b/keynav.c @@ -102,6 +102,7 @@ static int nviewports = 0; static int xinerama = 0; static int daemonize = 0; static int is_daemon = False; +static int picomfix = False; static Display *dpy; static Window zone; @@ -604,6 +605,8 @@ int parse_config_line(char *orig_line) { handle_commands(keyseq); } else if (strcmp(keyseq, "loadconfig") == 0) { handle_commands(keyseq); + } else if (strcmp(keyseq, "picomfix") == 0) { + picomfix=True; } else { keycode = parse_keycode(keyseq); if (keycode == 0) { @@ -1419,7 +1422,9 @@ void update() { if (((clip || draw) + (move || resize)) > 1) { /* more than one action to perform, unmap to hide move/draws * to reduce flickering */ - XUnmapWindow(dpy, zone); + if (picomfix == False) { + XUnmapWindow(dpy, zone); + } } if (clip || draw) { diff --git a/keynav.pod b/keynav.pod index c0aff30..ba3c86f 100644 --- a/keynav.pod +++ b/keynav.pod @@ -45,6 +45,11 @@ This will make keynav background itself after parsing the config file and setting up keybindings. If there are errors during keybinding, then keynav will not background and will exit with failure. +=item B + +This will fix an issue where keynav disappears when the picom compositor is +running, enabling this may cause more flickering. + =item B This wil clear all existing keybindings. This is useful if, for example, you do diff --git a/keynavrc b/keynavrc index 78c0c09..01d7689 100644 --- a/keynavrc +++ b/keynavrc @@ -24,6 +24,9 @@ # Use 'daemonize' to background ourselves. #daemonize +# Use 'picomfix' to fix issues associated with the picom compositor. May cause flickering. +# picomfix + ctrl+semicolon start Escape end ctrl+bracketleft end