all repos — tint2 @ 6c36f79aae2df35a7ae80de1a2fa6ba8cf606d99

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

enable shared memory method of getting window screenshot
Chris Lee @klee93
commit

6c36f79aae2df35a7ae80de1a2fa6ba8cf606d99

parent

d6827560120b1ee46d3f541a1219ffcc2b22f391

3 files changed, 5 insertions(+), 2 deletions(-)

jump to
M src/init.csrc/init.c

@@ -107,6 +107,7 @@ debug_dnd = getenv("DEBUG_DND") != NULL;

debug_thumbnails = getenv("DEBUG_THUMBNAILS") != NULL; debug_timers = getenv("DEBUG_TIMERS") != NULL; debug_executors = getenv("DEBUG_EXECUTORS") != NULL; + thumb_use_shm = getenv("TINT2_THUMBNAIL_SHM") != NULL; if (debug_fps) { init_fps_distribution(); char *s = getenv("TRACING_FPS_THRESHOLD");
M src/panel.hsrc/panel.h

@@ -98,6 +98,7 @@ extern gboolean debug_frames;

extern gboolean debug_thumbnails; extern double ui_scale_dpi_ref; extern double ui_scale_monitor_size_ref; +extern gboolean thumb_use_shm; typedef struct Panel { Area area;
M src/util/window.csrc/util/window.c

@@ -578,11 +578,12 @@ }

return empty; } +gboolean thumb_use_shm; + cairo_surface_t *get_window_thumbnail(Window win, int size) { cairo_surface_t *image_surface = NULL; - const gboolean shm_allowed = FALSE; - if (shm_allowed && server.has_shm && server.composite_manager) { + if (thumb_use_shm && server.has_shm && server.composite_manager) { image_surface = get_window_thumbnail_ximage(win, (size_t)size, TRUE); if (image_surface && cairo_surface_is_blank(image_surface)) { cairo_surface_destroy(image_surface);