* [PATCH] kconfig: lxdialog: fixed cursor render in checklist
@ 2024-02-16 14:10 Matthew Bystrin
2024-02-20 11:31 ` Masahiro Yamada
0 siblings, 1 reply; 2+ messages in thread
From: Matthew Bystrin @ 2024-02-16 14:10 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: linux-kbuild
When a checklist is opened, the cursor is rendered in a wrong position
(after the last list element on the screen). You can observe it by
opening any checklist in menuconfig.
Added wmove() to set the cursor in the proper position, just like in
menubox.c. Removed wnoutrefresh(dialog) because dialog window has
already been updated in print_buttons(). Replaced wnoutrefresh(list) and
doupdate() calls with one wrefresh(list) call.
Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com>
---
scripts/kconfig/lxdialog/checklist.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
index fd161cfff121..31d0a89fbeb7 100644
--- a/scripts/kconfig/lxdialog/checklist.c
+++ b/scripts/kconfig/lxdialog/checklist.c
@@ -188,9 +188,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
print_buttons(dialog, height, width, 0);
- wnoutrefresh(dialog);
- wnoutrefresh(list);
- doupdate();
+ wmove(list, choice, check_x + 1);
+ wrefresh(list);
while (key != KEY_ESC) {
key = wgetch(dialog);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] kconfig: lxdialog: fixed cursor render in checklist
2024-02-16 14:10 [PATCH] kconfig: lxdialog: fixed cursor render in checklist Matthew Bystrin
@ 2024-02-20 11:31 ` Masahiro Yamada
0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2024-02-20 11:31 UTC (permalink / raw)
To: Matthew Bystrin; +Cc: linux-kbuild
On Fri, Feb 16, 2024 at 11:10 PM Matthew Bystrin <dev.mbstr@gmail.com> wrote:
>
> When a checklist is opened, the cursor is rendered in a wrong position
> (after the last list element on the screen). You can observe it by
> opening any checklist in menuconfig.
>
> Added wmove() to set the cursor in the proper position, just like in
> menubox.c. Removed wnoutrefresh(dialog) because dialog window has
> already been updated in print_buttons(). Replaced wnoutrefresh(list) and
> doupdate() calls with one wrefresh(list) call.
>
> Signed-off-by: Matthew Bystrin <dev.mbstr@gmail.com>
Applied to linux-kbuild.
Thanks.
> ---
> scripts/kconfig/lxdialog/checklist.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kconfig/lxdialog/checklist.c b/scripts/kconfig/lxdialog/checklist.c
> index fd161cfff121..31d0a89fbeb7 100644
> --- a/scripts/kconfig/lxdialog/checklist.c
> +++ b/scripts/kconfig/lxdialog/checklist.c
> @@ -188,9 +188,8 @@ int dialog_checklist(const char *title, const char *prompt, int height,
>
> print_buttons(dialog, height, width, 0);
>
> - wnoutrefresh(dialog);
> - wnoutrefresh(list);
> - doupdate();
> + wmove(list, choice, check_x + 1);
> + wrefresh(list);
>
> while (key != KEY_ESC) {
> key = wgetch(dialog);
> --
> 2.43.0
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-20 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-16 14:10 [PATCH] kconfig: lxdialog: fixed cursor render in checklist Matthew Bystrin
2024-02-20 11:31 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox