correct patch

This commit is contained in:
Tuyen Pham 2021-07-17 11:48:38 +00:00
parent d2a4e37722
commit b56cf3a7ea

View file

@ -231,6 +231,13 @@ static void apply_workspace_state(struct sway_workspace *ws,
static void apply_container_state(struct sway_container *container, static void apply_container_state(struct sway_container *container,
struct sway_container_state *state) { struct sway_container_state *state) {
int tw = 0, th = 0;
struct wlr_texture *texture = config->border_textures.focused.texture;
if (texture) {
tw = texture->width;
th = texture->height;
}
struct sway_view *view = container->view; struct sway_view *view = container->view;
// Damage the old location // Damage the old location
desktop_damage_whole_container(container); desktop_damage_whole_container(container);
@ -238,10 +245,10 @@ static void apply_container_state(struct sway_container *container,
struct sway_saved_buffer *saved_buf; struct sway_saved_buffer *saved_buf;
wl_list_for_each(saved_buf, &view->saved_buffers, link) { wl_list_for_each(saved_buf, &view->saved_buffers, link) {
struct wlr_box box = { struct wlr_box box = {
.x = saved_buf->x - view->saved_geometry.x, .x = saved_buf->x - view->saved_geometry.x - tw,
.y = saved_buf->y - view->saved_geometry.y, .y = saved_buf->y - view->saved_geometry.y - th,
.width = saved_buf->width, .width = saved_buf->width + 2 * tw,
.height = saved_buf->height, .height = saved_buf->height + 2 * th,
}; };
desktop_damage_box(&box); desktop_damage_box(&box);
} }
@ -274,10 +281,10 @@ static void apply_container_state(struct sway_container *container,
if (view && view->surface) { if (view && view->surface) {
struct wlr_surface *surface = view->surface; struct wlr_surface *surface = view->surface;
struct wlr_box box = { struct wlr_box box = {
.x = container->current.content_x - view->geometry.x, .x = container->current.content_x - view->geometry.x - tw,
.y = container->current.content_y - view->geometry.y, .y = container->current.content_y - view->geometry.y - th,
.width = surface->current.width, .width = surface->current.width + 2 * tw,
.height = surface->current.height, .height = surface->current.height + 2 * th,
}; };
desktop_damage_box(&box); desktop_damage_box(&box);
} }