Skip to content

Commit 56bc784

Browse files
committed
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 <weihsinyeh168@gmail.com>
1 parent 2f2ee87 commit 56bc784

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/box.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ twin_dispatch_result_t _twin_box_dispatch(twin_widget_t *widget,
163163
case TwinEventConfigure:
164164
return _twin_box_configure(box);
165165
case TwinEventButtonDown:
166+
twin_window_show(widget->window);
166167
box->button_down =
167168
_twin_box_xy_to_widget(box, event->u.pointer.x, event->u.pointer.y);
168169
if (box->button_down && box->button_down->want_focus)

0 commit comments

Comments
 (0)