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

Window activation for existing windows #3633

Open
acarl005 opened this issue Apr 16, 2024 · 0 comments
Open

Window activation for existing windows #3633

acarl005 opened this issue Apr 16, 2024 · 0 comments
Labels
DS - wayland S - enhancement Wouldn't this be the coolest?

Comments

@acarl005
Copy link

acarl005 commented Apr 16, 2024

Description

The WindowBuilder::with_activation_token method allows the user to create a new window with an activation token on Linux.

However, according to the Wayland xdg-activation protocol, activation is not something that is limited to newly created windows. You can request activation on an existing window. It would be useful if the Window struct had a method to wrap this functionality, something like:

impl Window {
    pub fn activate(&self, token: ActivationToken) {
        if let Some(xdg_activation) = &self.xdg_activation {
            xdg_activation.activate(token._token, self.surface());
        }
    }
}

As an example use case, suppose an app was asked to handle a custom URI scheme (deep link) which was clicked in a web browser. In order to make it clear to the user that the app has handled the URI, it might want to request activation.

Relevant platforms

Wayland

@acarl005 acarl005 added the S - enhancement Wouldn't this be the coolest? label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS - wayland S - enhancement Wouldn't this be the coolest?
Development

No branches or pull requests

2 participants