Skip to content

Fix widgets not updating with parent's widget #90

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

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

weihsinyeh
Copy link
Collaborator

Implement the twin_widget_children_paint function to repaint all the box's widgets. The issue arises when the spline updates the pixmap beneath the button widget, the pixmap of the button isn't triggered to repaint. To solve this, we call the twin_widget_paint function after the spline update to ensure the related widget will be repainted.

@weihsinyeh
Copy link
Collaborator Author

The issue that this pull request aims to solve cannot always reproduce successfully. Therefore, I record it.
Screencast from 2025-01-20 17-19-00.webm

@weihsinyeh
Copy link
Collaborator Author

I also recorded the display after the code applied the modification of this pull request.
Screencast from 2025-01-20 17-26-19.webm

Implement the twin_widget_children_paint function to repaint all the
box's widgets. The issue arises when the spline updates the pixmap
beneath the button widget, the pixmap of the button isn't triggered
to repaint. To solve this, we call the twin_widget_paint function after
the spline update to ensure the related widget will be repainted.

Signed-off-by: Wei-Hsin Yeh <weihsinyeh168@gmail.com>
The global redisplay thread would block on a semaphore, which is
signaled by the per-window redisplay threads whenever the content of any
window changes. For example, the per-window redisplay thread is triggered
when its content twin_box_t is triggered by the event
TwinEventButtonDown. In this case, the corresponding window should also
be marked as active. To ensure proper display, we added the function
twin_window_show to indirectly update the damaged screen.

Signed-off-by: Wei-Hsin Yeh <weihsinyeh168@gmail.com>
@jserv jserv merged commit 2d855d2 into sysprog21:main Jan 21, 2025
3 checks passed
@jserv
Copy link
Contributor

jserv commented Jan 21, 2025

Thank @weihsinyeh for contributing!

@weihsinyeh weihsinyeh deleted the screen_update branch February 25, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants