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

hints kitten flashes the screen on use #4674

Closed
cole-h opened this issue Feb 10, 2022 · 3 comments
Closed

hints kitten flashes the screen on use #4674

cole-h opened this issue Feb 10, 2022 · 3 comments
Labels

Comments

@cole-h
Copy link

cole-h commented Feb 10, 2022

Describe the bug
When using any of the hints bindings, the terminal screen blanks for a brief moment.

To Reproduce
Steps to reproduce the behavior:

  1. Open up kitty
  2. Press any hints binding
  3. Notice the flash before the hints are drawn

Screenshots
Difficult to capture with a screenshot, and I am not currently equipped to do a screen recording.

Environment details

kitty 0.24.1 created by Kovid Goyal
Linux scadrial 5.15.18 #1-NixOS SMP Sat Jan 29 09:58:25 UTC 2022 x86_64

<<< Welcome to NixOS 22.05.20220209.a9b803c-cosmere (x86_64) - /dev/tty >>>


Running under:Wayland
Frozen: False
Paths:
  kitty: /nix/store/5gr8fqfg01xia7qwizrhgwk6cswl1bnh-kitty-0.24.1/bin/kitty
  base dir: /nix/store/5gr8fqfg01xia7qwizrhgwk6cswl1bnh-kitty-0.24.1/lib/kitty
  extensions dir: /nix/store/5gr8fqfg01xia7qwizrhgwk6cswl1bnh-kitty-0.24.1/lib/kitty/kitty
  system shell: /run/current-system/sw/bin/fish
Loaded config files:
  /home/vin/.config/kitty/kitty.conf

Config options different from defaults:
bell_on_tab                     False
disable_ligatures               2
focus_follows_mouse             True
font_family                     JetBrains Mono
scrollback_fill_enlarged_window True
scrollback_lines                200000
scrollback_pager                ['less', '--RAW-CONTROL-CHARS', '+INPUT_LINE_NUMBER']
shell_integration               frozenset({'enabled'})
sync_to_monitor                 False
tab_title_template              {fmt.fg.red}{bell_symbol}{activity_symbol}{fmt.fg.default}{title}
touch_scroll_multiplier         2.0
Removed mouse actions:
	 b1 -2 ungrabbed mouse_handle_click selection link prompt
Changed shortcuts:
	shift+ctrl+f kitten hints --type url --hints-offset 0 --alphabet zaqxswcdevfr
Colors:
	background                      #272727   
	color0                          #272727   
	color1                          #cc231c   
	color10                         #b8ba25   
	color11                         #fabc2e   
	color12                         #83a597   
	color13                         #d3859a   
	color14                         #8ec07b   
	color15                         #ebdbb2   
	color2                          #989719   
	color3                          #d79920   
	color4                          #448488   
	color5                          #b16185   
	color6                          #689d69   
	color7                          #a89983   
	color8                          #928373   
	color9                          #fb4833   
	foreground                      #ebdbb2   
	selection_background            #ebdbb2   
	selection_foreground            #655b53   
	url_color                       #d65c0d   

Additional context
I can reproduce with the following minimal config:

map kitty_mod+f kitten hints --type url

Just echo a URL somewhere and this should be easily reproduced.

@cole-h cole-h added the bug label Feb 10, 2022
@kovidgoyal
Copy link
Owner

Yes, that's unavoidable since hints are implemented as an overlay window.

@page-down
Copy link
Contributor

@kovidgoyal

I've been thinking about this recently.
For overlay, is it possible to start behind the current window (in the background) and then switch to the foreground after receiving a drawing finished notification similar to the atomic screen update escape sequence? (Also switch to the foreground after a timeout.)

The current situation looks like this:
current content - blank (program load time) - hints drawing complete

If it is possible to implement an overlay rendering finished notification:
current content (with short delay) - already drawn overlay

It also blinks when exiting. Perhaps it is also possible to press ESC and then switch to the background first, then exit directly.
If the exit times out due to an error, switch back to the foreground again. (This behavior should be user-configured, not the default.)

@kovidgoyal
Copy link
Owner

It's certainly possible, not something I care about enough myself
though. Patches welcome. You will need to jump through a fair few hoops
to make it robust since you have to deal with the case of the program
running in the overlay window crashing/hanging. The obvious solution is
a timeout, but that introduces latency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants