Idea of handling output enter/leave events: when the event comes, we store the number of enters/leaves for outputs and update them on the next idle. The idea is to cache together multiple events, which may be triggered especially when visibility recomputation happens.
| 441 | // for outputs and update them on the next idle. The idea is to cache together multiple events, which may |
| 442 | // be triggered especially when visibility recomputation happens. |
| 443 | void wf::scene::wlr_surface_node_t::handle_enter(wf::output_t *output) |
| 444 | { |
| 445 | pending_visibility_delta[output]++; |
| 446 | idle_update_outputs.run_once([&] () { update_pending_outputs(); }); |
| 447 | } |
| 448 | |
| 449 | void wf::scene::wlr_surface_node_t::handle_leave(wf::output_t *output) |
| 450 | { |
no test coverage detected