Skip to content

Commit

Permalink
Fix magpie_container_of invocations in foreign_toplevel.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Jun 23, 2024
1 parent 73dc22e commit c5c9040
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/foreign_toplevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ static void foreign_toplevel_handle_request_maximize_notify(wl_listener* listene
return;
}

const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_activate);
const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_maximize);
const auto& event = *static_cast<wlr_foreign_toplevel_handle_v1_maximized_event*>(data);

const auto placement = event.maximized ? VIEW_PLACEMENT_MAXIMIZED : VIEW_PLACEMENT_STACKING;
Expand All @@ -27,7 +27,7 @@ static void foreign_toplevel_handle_request_fullscreen_notify(wl_listener* liste
return;
}

const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_activate);
const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_fullscreen);
const auto& event = *static_cast<wlr_foreign_toplevel_handle_v1_maximized_event*>(data);

const auto placement = event.maximized ? VIEW_PLACEMENT_FULLSCREEN : VIEW_PLACEMENT_STACKING;
Expand All @@ -40,7 +40,7 @@ static void foreign_toplevel_handle_request_minimize_notify(wl_listener* listene
return;
}

const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_activate);
const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, request_minimize);
const auto& event = *static_cast<wlr_foreign_toplevel_handle_v1_minimized_event*>(data);

handle.view.set_minimized(event.minimized);
Expand Down

0 comments on commit c5c9040

Please sign in to comment.