-
Notifications
You must be signed in to change notification settings - Fork 46
Refactor Demos #212
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
base: master
Are you sure you want to change the base?
Refactor Demos #212
Conversation
- Make menu font larger if a larger font exists; - Don't block the main menu rendering; - Move demos to spearate files; - Simplify demo registration code; - Fix issues where nothing shows up in some demos; - Add standalone demos to the main demo interface; - Fix the related issues in the manual; - Allow opening multiple instances of individual demos; - Get rid of modelines in some files as modern editors are smart enough; - Disable some demos and test code until they are fixed. Recommended future improvements: - Recording and playing the history on window remap. This is not essential for demos that clear the window before drawing the next frame, but the demos like Plaid don't look quite nice without this enhancement. Issue: sharplispers#186
4980b41 to
064295e
Compare
Fix the following: - Image test - Trapezoid - Clipboard - Bezier (The original code seemed to be using a now-defunct experimental X11 Bezier extension. Replace it with a new implmentation.) The two remaining demos (gl-test and mandel) don't run at all. Need to get them working in a future patch before refactoring. I've re-enabled them for now. Issue: sharplispers#186
|
I think the PR is ready for a review. |
dkochmanski
left a comment
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.
Please split this pull request into more commits, that's too big as it is for me to review, i.e
Commit:
- Make menu font larger if a larger font exists;
- Don't block the main menu rendering;
- Simplify demo registration code;
- Get rid of modelines in some files as modern editors are smart enough;
Commit:
- Allow opening multiple instances of individual demos;
Commit:
- Move demos to spearate files;
Commit:
- Disable some demos and test code until they are fixed.
- Add standalone demos to the main demo interface;
Commit:
- Fix issues where nothing shows up in some demos;
Commit:
- Fix the related issues in the manual;
I've also noticed, that clx crashes my lisp instance when I close a window, but I've verified that this issue is already present in master. Is this the same for you?
|
|
||
| ;;; X11 Context Management | ||
|
|
||
| (defmacro with-x11-context (&body body) |
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.
This macro is defined and used wrong.
i.e
(with-x11-context ()
(let ((menu (create-demo-menu)))
(handle-events menu)))
will expand to
(unwind-protect nil
(let ((menu (create-demo-menu)))
(handle-events menu)))
(xlib:close-display *display*))
|
@dkochmanski thanks for the review. I'll make the changes.
No, I haven't seen this bug. I'm using SBCL. What Lisp are you using? What window manager? |
|
thanks for conformiation. I've actually tried to debug it and it led me to sbcl internals where it waits for fd being available (using posix subsystem). Going any deeper was unfeasible. I've formulated the following hypothesis: when we don't handle "close" event in demos, wayland (I'm using on this computer x11 compatibility layer) closes the fd, and when sbcl tries to fiddle with it, then the operating system kills sbcl for accessing unavailable resource. It does not happen on my other computer where I'm using "normal" x11. |
Here you can see how the demos look after the refactor: https://www.youtube.com/watch?v=PPpZDB61oxs
Issue: #186