aboutsummaryrefslogtreecommitdiffstats
path: root/src/screen_browser.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
committerMax Kellermann <max@duempel.org>2008-09-22 10:04:46 +0200
commite6d6231b4de336f60bc5b07331e2f1f01096c66c (patch)
treeca99bb77e967d794af8b88aebd3fdf9c50dc474b /src/screen_browser.c
parent07632841df4ff1d8fcfac33bd93e06ee43a4498e (diff)
downloadmpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.gz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.tar.xz
mpd-e6d6231b4de336f60bc5b07331e2f1f01096c66c.zip
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.
Diffstat (limited to 'src/screen_browser.c')
-rw-r--r--src/screen_browser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/screen_browser.c b/src/screen_browser.c
index 4c8bc2ed6..bbf69c522 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -423,7 +423,8 @@ browser_handle_mouse_event(struct screen_browser *browser, mpdclient_t *c)
else
length = 0;
- if( screen_get_mouse_event(c, browser->lw, length, &bstate, &row) )
+ if (screen_get_mouse_event(c, &bstate, &row) ||
+ list_window_mouse(browser->lw, length, bstate, row))
return 1;
browser->lw->selected = browser->lw->start + row;