From 56bc784f6161c3a35aba987d7a0ee5ba0f7969ed Mon Sep 17 00:00:00 2001 From: Wei-Hsin Yeh Date: Tue, 21 Jan 2025 00:25:21 +0800 Subject: [PATCH] Fix global redisplay not matching window updates 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 --- src/box.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/box.c b/src/box.c index f85138d..71945ae 100644 --- a/src/box.c +++ b/src/box.c @@ -163,6 +163,7 @@ twin_dispatch_result_t _twin_box_dispatch(twin_widget_t *widget, case TwinEventConfigure: return _twin_box_configure(box); case TwinEventButtonDown: + twin_window_show(widget->window); box->button_down = _twin_box_xy_to_widget(box, event->u.pointer.x, event->u.pointer.y); if (box->button_down && box->button_down->want_focus)