Skip to content

Commit

Permalink
Properly scope pid inside to_decorations_type
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Kosarek <[email protected]>
  • Loading branch information
tarek-y-ismail and mattkae authored Jul 3, 2024
1 parent 2aeb440 commit fc2d435
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/frontend_wayland/xdg_decoration_unstable_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,13 +202,15 @@ auto mir::frontend::XdgToplevelDecorationV1::to_decorations_type(uint32_t mode)
case Mode::server_side:
return DecorationStrategy::DecorationsType::ssd;
default:
{
pid_t pid;
wl_client_get_credentials(client->raw_client(), &pid, nullptr, nullptr); // null pointers are allowed

mir::log_warning("Client PID: %d, attempted to set invalid zxdg_toplevel_decoration_v1 mode (%d), defaulting to client side.", pid, mode);

return DecorationStrategy::DecorationsType::csd;
}
}
}

void mir::frontend::XdgToplevelDecorationV1::update_mode(uint32_t new_mode)
Expand Down

0 comments on commit fc2d435

Please sign in to comment.