Skip to content

Commit

Permalink
Check if there's a focused surface before getting its root
Browse files Browse the repository at this point in the history
  • Loading branch information
serebit committed Jul 13, 2024
1 parent 1599650 commit c191bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/surface/view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void View::begin_interactive(const CursorMode mode, const uint32_t edges) {
Cursor& cursor = server.seat->cursor;
wlr_surface* focused_surface = server.seat->wlr->pointer_state.focused_surface;

if (get_wlr_surface() != wlr_surface_get_root_surface(focused_surface)) {
if (focused_surface == nullptr || get_wlr_surface() != wlr_surface_get_root_surface(focused_surface)) {
/* Deny move/resize requests from unfocused clients. */
return;
}
Expand Down

0 comments on commit c191bfa

Please sign in to comment.