Skip to content

Commit

Permalink
Fix toplevels not activating on map
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Nov 4, 2023
1 parent 6705a03 commit 37abdb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

void Server::focus_view(View* view, wlr_surface* surface) {
wlr_surface* prev_surface = seat->wlr->keyboard_state.focused_surface;
if (prev_surface == surface) {
if (prev_surface == surface && surface != nullptr) {
/* Don't re-focus an already focused surface. */
return;
}
Expand All @@ -52,6 +52,8 @@ void Server::focus_view(View* view, wlr_surface* surface) {

if (view == nullptr) {
return;
} else if (surface == nullptr) {
surface = view->get_wlr_surface();
}

/* Move the view to the front */
Expand Down

0 comments on commit 37abdb5

Please sign in to comment.