Skip to content

Commit

Permalink
change layer-shell keyboard focus semantics, do not auto-focus when k…
Browse files Browse the repository at this point in the history
…eyboard-interactivity is changed to ON_DEMAND
  • Loading branch information
dkondor committed Oct 19, 2024
1 parent 0ea4fa6 commit d44a035
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/view/layer-shell/layer-shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ std::shared_ptr<wayfire_layer_shell_view> wayfire_layer_shell_view::create(wlr_l

lsurface->output = self->get_output()->handle;

// Initial state
self->prev_state = lsurface->current;

// Initial configure
self->on_commit_unmapped.emit(NULL);

Expand Down Expand Up @@ -565,10 +568,10 @@ void wayfire_layer_shell_view::commit()

if (prev_state.keyboard_interactive != state->keyboard_interactive)
{
if ((state->keyboard_interactive >= 1) && (state->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP))
if ((state->keyboard_interactive == 1) && (state->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP))
{
wf::get_core().seat->focus_view(self());
} else
} else if (state->keyboard_interactive == 0)
{
wf::get_core().seat->refocus();
}
Expand Down

0 comments on commit d44a035

Please sign in to comment.