Skip to content

Commit

Permalink
xdg-toplevel-view: read csd state as soon as possible
Browse files Browse the repository at this point in the history
We used to delay reading csd state until map time, but decoration
plugins want to know this earlier.
  • Loading branch information
ammen99 committed Jan 2, 2025
1 parent 3c0da50 commit 7e12957
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/view/xdg-shell/xdg-toplevel-view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,11 @@ wf::xdg_toplevel_view_t::xdg_toplevel_view_t(wlr_xdg_toplevel *tlvl) : xdg_tople
on_request_minimize.connect(&xdg_toplevel->events.request_minimize);
on_show_window_menu.connect(&xdg_toplevel->events.request_show_window_menu);
on_request_fullscreen.connect(&xdg_toplevel->events.request_fullscreen);

if (xdg_toplevel && uses_csd.count(xdg_toplevel->base->surface))
{
this->has_client_decoration = uses_csd[xdg_toplevel->base->surface];
}
}

std::shared_ptr<wf::xdg_toplevel_view_t> wf::xdg_toplevel_view_t::create(wlr_xdg_toplevel *toplevel)
Expand Down Expand Up @@ -302,11 +307,6 @@ bool wf::xdg_toplevel_view_t::is_mapped() const

void wf::xdg_toplevel_view_t::map()
{
if (xdg_toplevel && uses_csd.count(xdg_toplevel->base->surface))
{
this->has_client_decoration = uses_csd[xdg_toplevel->base->surface];
}

adjust_view_output_on_map(this);

xdg_toplevel_view_base_t::map();
Expand Down

0 comments on commit 7e12957

Please sign in to comment.