diff --git a/src/screen.c b/src/screen.c
index 9bbfda742ff2a32afd7c82d78ac26cd03e02af86..c34d3962e35b4afb20f48f62e9fa66b34c7d3d2e 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
/* ncmpc (Ncurses MPD Client)
* (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
-
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-
+ *
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
#include "screen.h"
#include "screen_interface.h"
#include "screen_list.h"
#include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
#include "config.h"
#include "i18n.h"
#include "charset.h"
{
if (COLS<SCREEN_MIN_COLS || LINES<SCREEN_MIN_ROWS) {
screen_exit();
- fprintf(stderr, "%s", _("Error: Screen too small"));
+ fprintf(stderr, "%s\n", _("Error: Screen too small"));
exit(EXIT_FAILURE);
}
-
+#ifdef PDCURSES
+ resize_term(LINES, COLS);
+#else
resizeterm(LINES, COLS);
+#endif
screen.cols = COLS;
screen.rows = LINES;
/* create main window */
window_init(&screen.main_window, screen.rows - 4, screen.cols, 2, 0);
- // leaveok(screen.main_window.w, TRUE); temporary disabled
+ if (!options.hardware_cursor)
+ leaveok(screen.main_window.w, TRUE);
+
keypad(screen.main_window.w, TRUE);
/* create progress window */
{
MEVENT event;
- /* retrieve the mouse event from ncurses */
+ /* retrieve the mouse event from curses */
+#ifdef PDCURSES
+ nc_getmouse(&event);
+#else
getmouse(&event);
+#endif
/* calculate the selected row in the list window */
*row = event.y - screen.title_bar.window.rows;
/* copy button state bits */
case CMD_SCREEN_OUTPUTS:
screen_switch(&screen_outputs, c);
break;
+#endif
case CMD_SCREEN_SWAP:
screen_swap(c, NULL);
break;
-#endif
default:
break;