rust-windowing / rust-windowing/winit

Window activation for existing windows

Open
#3,633 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DS - wayland S - enhancement
Dominant language
Rust
Stars
6.2k
Forks
1.3k
Avg merge
2d 19h
Merged PRs (30d)
9

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WindowBuilder::with_activation_token and Window APIs, then trace the Wayland xdg-activation integration described in the issue. Check how existing windows expose their Wayland surface and how activation tokens are represented. Done means an existing Window can request activation with a token on Wayland, with suitable coverage for the new behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, rust
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.