-
Notifications
You must be signed in to change notification settings - Fork 711
Share window effects BendWin through // @src #969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1235,7 +1235,9 @@ function eff_src(path: string, seen: Set<string>): string { | |
| return ""; | ||
| } | ||
| seen.add(path); | ||
| return fs.readFileSync(path, "utf8"); | ||
| const dir = path.slice(0, path.lastIndexOf("/")); | ||
| return fs.readFileSync(path, "utf8").replace(/^\/\/ @src ([a-z0-9_]+\.c)$/gm, | ||
| (_: string, name: string) => eff_src(dir + "/" + name, seen)); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Protect these helpers from output overwrite. The input set in |
||
| } | ||
|
|
||
| // Io | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Pulled by Window.open/frame/set_title/close (`// @src window_host.c`). | ||
| // The X11 window: its own connection (so its queue holds only its | ||
| // events), the frame's image and the events pumped since the last | ||
| // frame, five words each (kind, a, b, c, d) as on the Mac. | ||
| #if defined(__linux__) | ||
| #include <X11/Xlib.h> | ||
| #include <X11/Xutil.h> | ||
| #include <X11/keysym.h> | ||
|
|
||
| typedef struct { | ||
| Display* dpy; | ||
| Window win; | ||
| Atom del; | ||
| XImage* img; | ||
| u32 n; | ||
| u32 cap; | ||
| u32* evs; | ||
| } BendWin; | ||
| #endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Include transitive
@srcfiles in published packages.pkg_files()inmain.tsonly collects direct Bend imports, so an effect containing// @src helper.cbuilds locally but leaveshelper.cout of the package. I reproduced this by rebuilding from the files returned bypkg_files(); compilation fails withENOENTfor the helper. The package collector needs to follow these dependencies too.