tFix client mapping and support destroy - spkp - Stacking wayland compositor
(HTM) git clone git://git.z3bra.org/spkp.git
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) commit b5c2b30267eadf2c181b68a9bc65f0d7a3e3151e
(DIR) parent f805bce7842c9d4d2f8be23a73ec46e554830d8f
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Sun, 8 Nov 2020 12:04:13 +0100
Fix client mapping and support destroy
Diffstat:
M compositor.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/compositor.c b/compositor.c
t@@ -168,8 +168,8 @@ cb_frame_output(struct wl_listener *listener, void *data)
struct wlr_renderer *renderer;
output = wl_container_of(listener, output, frame);
- wlr_output = output->wlr_output;
renderer = output->server->renderer;
+ wlr_output = data;
if (!wlr_output->enabled)
return;
t@@ -256,6 +256,11 @@ cb_unmap_window(struct wl_listener *listener, void *data)
void
cb_destroy_window(struct wl_listener *listener, void *data)
{
+ struct window *w;
+
+ w = wl_container_of(listener, w, destroy);
+ wl_list_remove(&w->link);
+ free(w);
}
void
t@@ -273,8 +278,8 @@ render(struct wlr_surface *surface, int x, int y, void *data)
window = rdata->window;
output = rdata->output;
- box.x = 0;
- box.y = 0;
+ box.x = window->x + x;
+ box.y = window->y + y;
box.width = surface->current.width;
box.height = surface->current.height;