Unified · Split
| @@ -79,9 +79,7 @@ wl_surface_frame_done(void *data, struct wl_callback *cb, uint32_t time) · 78 unmodified lines | ||
| 79 | 79 | wl = data; |
| 80 | 80 | wl_callback_destroy(cb); |
| 81 | 81 | cb = wl_surface_frame(wl->surface); |
| 82 | − qlock(&drawlock); | |
| 83 | 82 | wlflush(wl); |
| 84 | − qunlock(&drawlock); | |
| 85 | 83 | wl_callback_add_listener(cb, &wl_surface_frame_listener, wl); |
| 86 | 84 | } |
| 87 | 85 | |
| @@ -51,7 +51,8 @@ wlflush(Wlwin *wl) · 50 unmodified lines | ||
| 51 | 51 | memcpy(wl->shm_data, gscreen->data->bdata, wl->dx*wl->dy*4); |
| 52 | 52 | |
| 53 | 53 | wl_surface_attach(wl->surface, wl->screenbuffer, 0, 0); |
| 54 | − wl_surface_damage(wl->surface, 0, 0, wl->dx, wl->dy); | |
| 54 | + if(wl->dirty) | |
| 55 | + wl_surface_damage(wl->surface, 0, 0, wl->dx, wl->dy); | |
| 55 | 56 | wl_surface_commit(wl->surface); |
| 56 | 57 | wl->dirty = 0; |
| 57 | 58 | } |