-
Notifications
You must be signed in to change notification settings - Fork 41
panel/menu: launch apps with a valid xdg-activation token #293
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
base: master
Are you sure you want to change the base?
Conversation
Creating a Gdk::AppLaunchContext from the current display and providing it to Gio::AppInfo::launch() takes care of this.
|
I've tested this and it works as expected, The same can be said for equivalent changes to the gtk4 branch I have, so I'm going to apply this there too. |
Apply patch by : https://github.com/dkondor For reference : WayfireWM#293
|
Shouldn't similar changes also be applied for |
Actually yes :) I've added an implementation, but it is not working. My hunch is that since the panel does not get keyboard focus, generating a token runs into some problem. Running with For some reason, the panel's surface is not set -- compare this to the case of using the menu: which works well. (note: this is with setting the |
|
@trigg This has been added with the gtk4 port, right? |
|
On assessing again, we didn't include I see @dkondor helpfully referenced sources, but it's lost on me as to what they mean in context. Hold off closing until this discrepancy is addressed. @dkondor Does this change not work without startup notify? |
|
Unfortunately, the links I added became outdated. It should be the following: The same logic in the latest master: Basically, if this key is not set, then the However, as I wrote above, I could not get this case to work properly. I believe the reason is that GTK will not generate a valid xdg-activation token if it does not think we have the keyboard focus. This might be different in GTK4 though (also given the architectural change of gtk-layer-shell-4), but I haven't had the time to test though. Note that on Wayfire, this is not very apparent, since new windows always get focused (I have the linked PRs to change this, but will have to revisit them as they don't work properly in all cases with layer-shell surfaces). |
|
@dkondor if you update to gtk4, I am not against merging this :) |
|
I haven't looked at the gtk4 version yet, but will try to test if it works with it |
Creating a Gdk::AppLaunchContext from the current display and providing it to Gio::AppInfo::launch() takes care of this.
This can be useful if a compositor is set not to focus newly created toplevels without a valid xdg-activation token (see WayfireWM/wayfire#2627)