aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lxdialog/util.c
diff options
context:
space:
mode:
authorDirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de>2012-08-06 16:48:23 +0200
committerMichal Marek <mmarek@suse.cz>2012-08-30 14:47:34 +0200
commit3eb95c84ee594d4a4e5a8c37b01464cff4762c96 (patch)
tree9a23135c58138bbe871258bee71d41c60caf1868 /scripts/kconfig/lxdialog/util.c
parentLinux 3.6-rc1 (diff)
downloadlinux-dev-3eb95c84ee594d4a4e5a8c37b01464cff4762c96.tar.xz
linux-dev-3eb95c84ee594d4a4e5a8c37b01464cff4762c96.zip
kconfig/mconf.c: revision of curses initialization.
Since commit d0e1e09568 initscr() is called twice in mconf. Do it only in init_dialog() in util.c and there also save the cursor position for the signal handler in mconf.c. Signed-off-by: Dirk Gouders <gouders@et.bocholt.fh-gelsenkirchen.de> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to '')
-rw-r--r--scripts/kconfig/lxdialog/util.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index f2375ad7ebc9..109d53117d22 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -23,6 +23,9 @@
#include "dialog.h"
+/* Needed in signal handler in mconf.c */
+int saved_x, saved_y;
+
struct dialog_info dlg;
static void set_mono_theme(void)
@@ -273,6 +276,10 @@ int init_dialog(const char *backtitle)
int height, width;
initscr(); /* Init curses */
+
+ /* Get current cursor position for signal handler in mconf.c */
+ getyx(stdscr, saved_y, saved_x);
+
getmaxyx(stdscr, height, width);
if (height < 19 || width < 80) {
endwin();