History

wayland: ensure we grab the drawlock for writes to the frame buffer.

Jacob Moody committed 5 years ago

Commit 4d482df1 parent 375b0041 file · +5 −2Browse files

Unified · Split

gui-wl/wl-screen.c+5−2
@@ -114,11 +114,12 @@ wlattach(char *label) · 113 unmodified lines
114114 gscreen->r = r;
115115 rectclip(&(gscreen->clipr), gscreen->r);
116116
117− wldrawcursor(wl, &arrow);
118117 wl->runing = 1;
119118 kproc("wldispatch", dispatchproc, wl);
120119 terminit();
120+ qlock(&drawlock);
121121 wlflush(wl);
122+ qunlock(&drawlock);
122123 return wl;
123124 }
124125
@@ -169,7 +170,9 @@ screensize(Rectangle r, ulong chan) · 44 unmodified lines
169170 void
170171 setcursor(void)
171172 {
172− wldrawcursor(snarfwin, &cursor);
173+ qlock(&drawlock);
174+ wldrawcursor(snarfwin, &arrow);
175+ qunlock(&drawlock);
173176 }
174177
175178 void

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