From 9c0ce700b20e2d3cf4fdca2a4421916be6f10812 Mon Sep 17 00:00:00 2001 From: William McBrine Date: Sun, 23 Jul 2006 18:56:28 +0000 Subject: [PATCH] Use the standard curs_set() instead of PDC_cursor_*(), which was never implemented for X. There's some controversy whether leaveok() is really supposed to turn off the cursor... but if it's OK to leave it anywhere, then why not leave it off the screen? Also, with this change, turning off leaveok() will always do curs_set(1), regardless of the previous state of the cursor. --- pdcurses/kernel.c | 5 ++--- pdcurses/outopts.c | 7 ++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pdcurses/kernel.c b/pdcurses/kernel.c index 9acac420..a639efbe 100644 --- a/pdcurses/kernel.c +++ b/pdcurses/kernel.c @@ -36,7 +36,7 @@ # undef wmove #endif -RCSID("$Id: kernel.c,v 1.50 2006/07/23 14:54:17 wmcbrine Exp $"); +RCSID("$Id: kernel.c,v 1.51 2006/07/23 18:56:28 wmcbrine Exp $"); RIPPEDOFFLINE linesripped[5]; char linesrippedoff = 0; @@ -162,8 +162,7 @@ static int PDC_restore_mode(struct cttyset *ctty) if (ctty->saved.raw_out) raw(); - if (ctty->saved.visible_cursor) - PDC_cursor_on(); + curs_set(ctty->saved.visibility); SP->font = PDC_get_font(); PDC_set_font(ctty->saved.font); diff --git a/pdcurses/outopts.c b/pdcurses/outopts.c index caa0ecaf..cc3c47d5 100644 --- a/pdcurses/outopts.c +++ b/pdcurses/outopts.c @@ -29,7 +29,7 @@ #undef scrollok #undef raw_output -RCSID("$Id: outopts.c,v 1.22 2006/07/15 15:38:24 wmcbrine Exp $"); +RCSID("$Id: outopts.c,v 1.23 2006/07/23 18:56:28 wmcbrine Exp $"); /*man-start************************************************************** @@ -161,10 +161,7 @@ int leaveok(WINDOW *win, bool bf) win->_leaveit = bf; - if (bf) - PDC_cursor_off(); - else - PDC_cursor_on(); + curs_set(bf); return OK; }