diff options
Diffstat (limited to 'moc_x11.c')
| -rw-r--r-- | moc_x11.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -93,7 +93,7 @@ int main() { } int s = DefaultScreen(dpy); - Window win = XCreateSimpleWindow(dpy, RootWindow(dpy, s), 10, 10, 660, 200, 1, + Window win = XCreateSimpleWindow(dpy, RootWindow(dpy, s), 10, 10, 660, 600, 1, BlackPixel(dpy, s), WhitePixel(dpy, s)); XSelectInput(dpy, win, ExposureMask | ButtonPress | KeyPressMask); XMapWindow(dpy, win); @@ -152,6 +152,18 @@ int main() { } + + y_offset += 10; + XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, "Playlist:", 9); + y_offset += 15; + { + struct moc_plist_item *item; + for (item = mh->playlist; item; item = item->next) { + const char *label = (item->title && item->title[0]) ? item->title : item->file; + XDrawString(dpy, win, DefaultGC(dpy, s), x, y_offset, label, strlen(label)); + y_offset += 15; + } + } pthread_mutex_unlock(&mh->lock); } |
