History

gui-wl: do not hold the lock, otherwise compositor locks up for the duration of the redraw

Sigrid Solveig Haflínudóttir committed 4 years ago

Commit 5e5cd801 parent 5c08d0f2 files · +2 −3Browse files

Unified · Split

2 files
  1. gui-wl/wl-cb.c +0 −2
  2. gui-wl/wl-screen.c +2 −1
gui-wl/wl-cb.c+0−2
@@ -79,9 +79,7 @@ wl_surface_frame_done(void *data, struct wl_callback *cb, uint32_t time) · 78 unmodified lines
7979 wl = data;
8080 wl_callback_destroy(cb);
8181 cb = wl_surface_frame(wl->surface);
82− qlock(&drawlock);
8382 wlflush(wl);
84− qunlock(&drawlock);
8583 wl_callback_add_listener(cb, &wl_surface_frame_listener, wl);
8684 }
8785
gui-wl/wl-screen.c+2−1
@@ -51,7 +51,8 @@ wlflush(Wlwin *wl) · 50 unmodified lines
5151 memcpy(wl->shm_data, gscreen->data->bdata, wl->dx*wl->dy*4);
5252
5353 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);
5556 wl_surface_commit(wl->surface);
5657 wl->dirty = 0;
5758 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t