fix: error buffer position for gtk app in overview

This commit is contained in:
DreamMaoMao 2026-05-21 08:29:14 +08:00
parent c2d84ce367
commit ab520cf83b

View file

@ -6100,11 +6100,19 @@ void overview_backup_surface(Client *c) {
return; return;
} }
struct wlr_box clip_box; struct wlr_box geometry;
clip_box.x = 0; client_get_geometry(c, &geometry);
clip_box.y = 0; struct wlr_box clip_box = (struct wlr_box){
clip_box.width = c->overview_backup_geom.width - 2 * config.borderpx; .x = geometry.x,
clip_box.height = c->overview_backup_geom.height - 2 * config.borderpx; .y = geometry.y,
.width = c->overview_backup_geom.width - 2 * config.borderpx,
.height = c->overview_backup_geom.height - 2 * config.borderpx,
};
if (client_is_x11(c)) {
clip_box.x = 0;
clip_box.y = 0;
}
c->overview_scene_surface = c->scene_surface; c->overview_scene_surface = c->scene_surface;
wlr_scene_node_set_enabled(&c->scene_surface->node, true); wlr_scene_node_set_enabled(&c->scene_surface->node, true);