Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xdg-activation: Add client_id to token data #1203

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

Drakulix
Copy link
Member

@Drakulix Drakulix commented Nov 6, 2023

Makes it easier to special case certain (e.g. privileged) clients, as surface and seat (which could otherwise be used to get the client) are optional.

@@ -87,7 +87,7 @@ where
{
fn request(
state: &mut D,
_: &Client,
client: &Client,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd wonder would the ClientId be preferable or pass a whole Client? You can get the id from a Client but also do lookup on the Client you get.

Copy link
Member Author

@Drakulix Drakulix Nov 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original client could disconnect before the token is used by another client. I didn't want to force the object to keep on living. In that sense it serves as an Option<Client>.

So in token_created this will always be a valid id, but in request_activation it might not be.

@Drakulix Drakulix merged commit a8f3c46 into master Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants