summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorBert <ber.t@gmx.com>2011-02-16 21:40:20 +0100
committerBert <ber.t@gmx.com>2011-02-16 21:40:20 +0100
commit26c2179be7676df3049035e5e65039c7fc232cb7 (patch)
treed1800498556c3617cfa4fad49d9bfd4176e2d383 /window.c
parent8919204a2e666e12216240a792bfff7a391d4d43 (diff)
downloadnsxiv-26c2179be7676df3049035e5e65039c7fc232cb7.tar.zst
Refactored thumbs, new files thumbs.[ch]
Diffstat (limited to 'window.c')
-rw-r--r--window.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/window.c b/window.c
index d585c55..0ea3fba 100644
--- a/window.c
+++ b/window.c
@@ -211,19 +211,21 @@ void win_toggle_fullscreen(win_t *win) {
SubstructureNotifyMask, &ev);
}
-Pixmap win_create_pixmap(win_t *win) {
+Pixmap win_create_pixmap(win_t *win, int w, int h) {
if (!win)
return 0;
- return XCreatePixmap(win->env.dpy, win->xwin, THUMB_SIZE, THUMB_SIZE,
- win->env.depth);
+ return XCreatePixmap(win->env.dpy, win->xwin, w, h, win->env.depth);
}
-void win_draw_pixmap(win_t *win, Pixmap pm, int x, int y, int w, int h) {
- if (!win)
- return;
+void win_free_pixmap(win_t *win, Pixmap pm) {
+ if (win && pm)
+ XFreePixmap(win->env.dpy, pm);
+}
- XCopyArea(win->env.dpy, pm, win->pm, bgc, 0, 0, w, h, x, y);
+void win_draw_pixmap(win_t *win, Pixmap pm, int x, int y, int w, int h) {
+ if (win)
+ XCopyArea(win->env.dpy, pm, win->pm, bgc, 0, 0, w, h, x, y);
}
void win_clear(win_t *win) {