-
Notifications
You must be signed in to change notification settings - Fork 909
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 support #2279
Comments
I was a bit wrong wrt API, given that Wayland is async here and you must creating a token is a request to compositor leaving you wait until the request is done means that it should reply to application async via some event... |
Not sure I understand, is the "activation token" equivalent to an "application id" (macOS has those)? If no, how do they differ? Would this allow a similar thing as #1751? |
No, it's completely different thing. It's basically what Example, clicking on links in terminal will switch focus to a browser or mark it as urgent(depends on compositor). Without token passing it's impossible to know where the link opened or what actually launched. It could be passed to other winit window, so it'll get focus or if you want to switch focus to other winit window when feel like. |
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
Are you sure that xdg-activation and startup-notification do similar things? The xdg-activation spec begins with:
startup-notification... doesn't have any explanation that I can find. So, instead I found: https://developer-old.gnome.org/platform-overview/stable/dev-launching-startupnotify.html.en
I understand this as a completely different use case. Basically, I vaguely remember that KDE would change my mouse cursor when I started an application via the menu, showing the app's icon next to the mouse cursor while the app was starting. I bet it doesn't do that anymore, so just imagine an hourglass as mouse cursor between "the app is started" and "the app is done starting". I am not saying that something somewhere does some focus-passing via sn events, but I am trying to say that these two protocols (xdg-activation and startup-notification) don't seem closely related to me. |
@psychon it's wired the same in GTK if you read its code and it's wired the same inside the firefox. The Wayland spec refers to X11 spec and wayland compositors use the tokens from xdg-activation for |
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279.
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes #2279. Co-authored-by: John Nunley <jtnunley01@gmail.com>
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes rust-windowing#2279. Co-authored-by: John Nunley <jtnunley01@gmail.com>
The utils in this module should help the users to activate the windows they create, as well as manage activation tokens environment variables. The API is essential for Wayland in the first place, since some compositors may decide initial focus of the window based on whether the activation token was during the window creation. Fixes #2279. Co-authored-by: John Nunley <jtnunley01@gmail.com>
On Wayland for link to raise window(e.g. when clicking a link in application, the launcher application should be opened with some env variable set to specific token).
Both X11 and Wayland has concept like that, see
https://wayland.app/protocols/xdg-activation-v1 and its
XDG_ACTIVATION_TOKEN
variable.And X11
https://cgit.freedesktop.org/startup-notification/tree/doc/startup-notification.txt
I'm not sure whether macOS or Windows have something like that, but they probably should.
For now, to account for Wayland, we should add a method on
WindowBuilder::with_activation_token(<Option<String>>)
and add a method on a particular window to request activation token.The first will be used when the application is raised from other process or in multiwindow context. The later to run launchers e.g.
xdg-open
or same in multiwindow context.cc @ArturKovacs @maroider @madsmtm
--
I'll send Wayland impl and impl it in alacritty, since it looks pretty straightforward.
The text was updated successfully, but these errors were encountered: