Taskbar: thumbnails (use image size without cosidering frame)
o9000 mrovi9000@gmail.com
1 files changed,
5 insertions(+),
6 deletions(-)
jump to
M
src/util/window.c
→
src/util/window.c
@@ -359,9 +359,12 @@ }
cairo_surface_t *get_window_thumbnail(Window win) { - int x, y, w, h; - if (!get_window_coordinates(win, &x, &y, &w, &h) || !w || !h) + XWindowAttributes wa; + if (!XGetWindowAttributes(server.display, win, &wa)) return NULL; + int w, h; + w = wa.width; + h = wa.height; int tw, th; double sx, sy;@@ -380,10 +383,6 @@ sx = tw/(double)w;
sy = th/(double)h; ox = oy = 0; } - - XWindowAttributes wa; - if (!XGetWindowAttributes(server.display, win, &wa)) - return NULL; cairo_surface_t *x11_surface = cairo_xlib_surface_create(server.display, win, wa.visual, w, h);