Skip to content

Commit

Permalink
layer-shell: fix not saving the initial state when a view is mapped (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
dkondor authored Dec 6, 2024
1 parent f66f23c commit feb5c26
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/view/layer-shell/layer-shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,17 +505,18 @@ void wayfire_layer_shell_view::map()
on_surface_commit.connect(&lsurface->surface->events.commit);

/* Read initial data */
keyboard_focus_enabled = lsurface->current.keyboard_interactive;
auto& state = lsurface->current;
keyboard_focus_enabled = state.keyboard_interactive;

wf::scene::add_front(get_output()->node_for_layer(get_layer()), get_root_node());
wf_layer_shell_manager::get_instance().handle_map(this);

auto& state = lsurface->current;
if ((state.keyboard_interactive >= 1) && (state.layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP))
{
wf::get_core().seat->focus_view(self());
}

prev_state = state;
emit_view_map();
}

Expand Down

0 comments on commit feb5c26

Please sign in to comment.