Skip to content

Commit

Permalink
Implement set_rectangle in foreign toplevel
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Oct 23, 2023
1 parent b021e82 commit f81b8f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/foreign_toplevel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ static void foreign_toplevel_handle_request_close_notify(wl_listener* listener,
}

static void foreign_toplevel_handle_set_rectangle_notify(wl_listener* listener, void* data) {
(void) listener;
(void) data;
const ForeignToplevelHandle& handle = magpie_container_of(listener, handle, set_rectangle);
auto& event = *static_cast<wlr_foreign_toplevel_handle_v1_set_rectangle_event*>(data);

handle.view.set_position(event.x, event.y);
handle.view.set_size(event.width, event.height);
}

ForeignToplevelHandle::ForeignToplevelHandle(View& view) noexcept
Expand Down

0 comments on commit f81b8f8

Please sign in to comment.