From e6d6231b4de336f60bc5b07331e2f1f01096c66c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 22 Sep 2008 10:04:46 +0200 Subject: screen: moved list_window mouse code to list_window.c Move the portion of screen_get_mouse_event() which handles list_window clicks to list_window.c. The code contained a NULL pointer dereference, which is now fixed. --- src/screen_play.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/screen_play.c') diff --git a/src/screen_play.c b/src/screen_play.c index cd43982c3..11d475478 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -422,7 +422,8 @@ handle_mouse_event(mpd_unused screen_t *screen, mpdclient_t *c) unsigned selected; unsigned long bstate; - if (screen_get_mouse_event(c, lw, c->playlist.list->len, &bstate, &row)) + if (screen_get_mouse_event(c, &bstate, &row) || + list_window_mouse(lw, c->playlist.list->len, bstate, row)) return 1; if (bstate & BUTTON1_DOUBLE_CLICKED) { -- cgit v1.2.3