Commit e5ecc0c1 by o9000

Taskbar: thumbnails (use image size without cosidering frame)

parent 812e3063
......@@ -359,9 +359,12 @@ char *get_window_name(Window win)
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;
......@@ -381,10 +384,6 @@ cairo_surface_t *get_window_thumbnail(Window win)
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);
cairo_surface_t *image_surface = cairo_surface_create_similar_image(x11_surface, CAIRO_FORMAT_ARGB32, tw, th);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment