Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## 2026-02-04 - XSync vs XFlush in Drawing
**Learning:** forces a blocking round-trip to the X server, which is catastrophic for frequent drawing operations like bar updates ().
**Action:** Use for drawing operations where the client doesn't need to wait for the server's response.
Comment on lines +2 to +3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (typo): The first "Learning" and "Action" lines appear incomplete and missing function names.

In the first pair of lines, the text after "Learning:" is missing, and "bar updates ()" has empty parentheses. The "Action: Use for drawing..." line also lacks the function name. Since the second pair of lines already correctly mentions XSync, XFlush, and drw_map, please either complete these first two lines to match the intended wording or remove them if they were an earlier draft.

## 2026-02-04 - XSync vs XFlush in Drawing
**Learning:** `XSync` forces a blocking round-trip to the X server, which is catastrophic for frequent drawing operations like bar updates (`drw_map`).
**Action:** Use `XFlush` for drawing operations where the client doesn't need to wait for the server's response.
3 changes: 2 additions & 1 deletion drw.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ void drw_map(Drw *drw, Window win, int x, int y, unsigned int w,
}

XCopyArea(drw->dpy, drw->drawable, win, drw->gc, x, y, w, h, x, y);
XSync(drw->dpy, False);
/* XFlush is sufficient and avoids blocking round-trip overhead of XSync */
XFlush(drw->dpy);
}

unsigned int drw_fontset_getwidth(Drw *drw, const char *text) {
Expand Down