ref: 5e5cd80755ea4c164eae70d876a3f9b864fe742e
parent: 5c08d0f7ce762e0e9ec5e5be2e504ef2359173f3
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Wed Jan 19 19:46:07 EST 2022
gui-wl: do not hold the lock, otherwise compositor locks up for the duration of the redraw
--- a/gui-wl/wl-cb.c
+++ b/gui-wl/wl-cb.c
@@ -79,9 +79,7 @@
wl = data;
wl_callback_destroy(cb);
cb = wl_surface_frame(wl->surface);
- qlock(&drawlock);
wlflush(wl);
- qunlock(&drawlock);
wl_callback_add_listener(cb, &wl_surface_frame_listener, wl);
}
--- a/gui-wl/wl-screen.c
+++ b/gui-wl/wl-screen.c
@@ -51,7 +51,8 @@
memcpy(wl->shm_data, gscreen->data->bdata, wl->dx*wl->dy*4);
wl_surface_attach(wl->surface, wl->screenbuffer, 0, 0);
- wl_surface_damage(wl->surface, 0, 0, wl->dx, wl->dy);
+ if(wl->dirty)
+ wl_surface_damage(wl->surface, 0, 0, wl->dx, wl->dy);
wl_surface_commit(wl->surface);
wl->dirty = 0;
}