all repos — tint2 @ e5ecc0c15d4ec42787971ed0b0c28848ea183455

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

Taskbar: thumbnails (use image size without cosidering frame)
o9000 mrovi9000@gmail.com
commit

e5ecc0c15d4ec42787971ed0b0c28848ea183455

parent

812e3063767961a962d12efe4fa47eb35167938c

1 files changed, 5 insertions(+), 6 deletions(-)

jump to
M src/util/window.csrc/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);