Skip to content

Commit

Permalink
wlcs_anvil: Update for anvil
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Dec 20, 2022
1 parent 64c57c1 commit ac6483d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wlcs_anvil/src/main_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,12 @@ fn handle_event(
// find the surface
let client = state.backend_data.clients.get(&client_id);
let toplevel = state.space.elements().find(|w| {
let surface = w.toplevel().wl_surface();
display.handle().get_client(surface.id()).ok().as_ref() == client
&& surface.id().protocol_id() == surface_id
if let Some(surface) = w.wl_surface() {
display.handle().get_client(surface.id()).ok().as_ref() == client
&& surface.id().protocol_id() == surface_id
} else {
false
}
});
if let Some(toplevel) = toplevel.cloned() {
// set its location
Expand Down

0 comments on commit ac6483d

Please sign in to comment.