Skip to content

Commit

Permalink
Fix global redisplay not matching window updates
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
weihsinyeh committed Jan 20, 2025
1 parent 2f2ee87 commit 56bc784
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/box.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 56bc784

Please sign in to comment.