Skip to content

Commit

Permalink
follow-focus: check whether a focused view is there in the timer hand…
Browse files Browse the repository at this point in the history
…ler (#201)
  • Loading branch information
ammen99 authored Oct 13, 2023
1 parent 11717c4 commit 0bf18d4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/follow-focus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ class wayfire_follow_focus : public wf::per_output_plugin_instance_t
void change_view()
{
auto view = wf::get_core().get_cursor_focus_view();

wf::get_core().seat->focus_view(view);
if (raise_on_top)
if (view)
{
view_bring_to_front(view);
wf::get_core().seat->focus_view(view);
if (raise_on_top)
{
view_bring_to_front(view);
}
}
}

Expand Down

0 comments on commit 0bf18d4

Please sign in to comment.