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

Curses getch() receiving input from resizing #1626

Open
fist-it opened this issue Apr 11, 2024 · 0 comments
Open

Curses getch() receiving input from resizing #1626

fist-it opened this issue Apr 11, 2024 · 0 comments

Comments

@fist-it
Copy link

fist-it commented Apr 11, 2024

Describe the bug
A clear and concise description of what the bug is.

When amethyst does what it's supposed to, terminal curses process gets ~Z input.

Applications:
What applications are involved?

kitty terminal, ncurses.h

To Reproduce
Steps to reproduce the behavior:

  • write a simple program using ncurses, print getch(), for example:
int main() {
    initscr();
    noecho();
    mvprintw(0, 0, "Hello World");
    while(1){
        mvprintw(1, 0, "%c", getch());
    }
    endwin();
    return 0;
}
  • cause amethyst to resize any window (not only terminal)

Expected behavior
A clear and concise description of what you expected to happen.

getch() not getting any inputs

Screenshots
If applicable, add screenshots to help explain your problem.

Screenshot 2024-04-11 at 14 39 38
Screenshot 2024-04-11 at 14 39 55

Versions:

  • macOS: Sonoma 14.4.1
  • Amethyst: 0.20.0

Debug Info

Version: 0.20.0 (108)

OS version: Version 14.4.1 (Build 23E224)

Screens:
	(0.0, 0.0, 2560.0, 1440.0) [(0.0, 0.0, 2560.0, 1440.0)]

Configuration:
smart-window-margins: 1
screen-padding-left: 0
floating: (
)
window-margin-size: 0
mod2: (
    option,
    shift,
    control
)
window-resize-step: 5
window-max-count: 0
enables-layout-hud-on-space-change: 0
mouse-resizes-windows: 0
use-canary-build: 0
follow-space-thrown-windows: 1
float-small-windows: 1
focus-follows-mouse: 0
ignore-menu-bar: 0
mouse-swaps-windows: 1
window-minimum-width: 0
floating-is-blacklist: 1
restore-layouts-on-launch: 0
debug-layout-info: 0
mod1: (
    option,
    shift
)
window-minimum-height: 0
window-margins: 1
new-windows-to-main: 0
screen-padding-bottom: 0
screen-padding-top: 0
screen-padding-right: 0
mouse-follows-focus: 0
layouts: (
    tall,
    fullscreen,
    wide,
    column
)
enables-layout-hud: 0

Note: --include-apps will list your manageable applications, but is optional if you don't want to list that.

Additional context
Add any other context about the problem here.

bug encountered while trying to attach lldb from clion to process,
at that time it had only 1 getch, and popup window to choose the process
closed it.
Issue not present with normal getchar().

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

No branches or pull requests

1 participant