Code

screen.c: Add pdcurses mouse support
authorAvuton Olrich <avuton@gmail.com>
Sun, 30 Oct 2011 04:30:12 +0000 (21:30 -0700)
committerAvuton Olrich <avuton@gmail.com>
Thu, 3 Nov 2011 11:08:32 +0000 (04:08 -0700)
src/screen.c

index 2d8ab6a955782c69ce62d8dc4c048b9b40213a39..64c704b4902ebc8589c8ffb3962c1078926be215 100644 (file)
@@ -471,8 +471,12 @@ screen_get_mouse_event(struct mpdclient *c, unsigned long *bstate, int *row)
 {
        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 */