Skip to content

Commit

Permalink
Handle WaylandSurfaceObserver::entered_output/left_output on Wayland …
Browse files Browse the repository at this point in the history
…thread
  • Loading branch information
AlanGriffiths committed Sep 4, 2024
1 parent efcdc4f commit b6b0300
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/server/frontend_wayland/wayland_surface_observer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,20 @@ void mf::WaylandSurfaceObserver::input_consumed(ms::Surface const*, std::shared_

void mf::WaylandSurfaceObserver::entered_output(ms::Surface const*, graphics::DisplayConfigurationOutputId const& id)
{
impl->window.value().handle_enter_output(id);
run_on_wayland_thread_unless_window_destroyed(
[id](Impl* impl, WindowWlSurfaceRole*)
{
impl->window.value().handle_enter_output(id);
});
}

void mf::WaylandSurfaceObserver::left_output(ms::Surface const*, graphics::DisplayConfigurationOutputId const& id)
{
impl->window.value().handle_leave_output(id);
run_on_wayland_thread_unless_window_destroyed(
[id](Impl* impl, WindowWlSurfaceRole*)
{
impl->window.value().handle_leave_output(id);
});
}

void mf::WaylandSurfaceObserver::run_on_wayland_thread_unless_window_destroyed(
Expand Down

0 comments on commit b6b0300

Please sign in to comment.