xdg-activation: add focus stealing prevention when using tokens#2626
xdg-activation: add focus stealing prevention when using tokens#2626dkondor wants to merge 1 commit intoWayfireWM:masterfrom
Conversation
|
I am wondering how does this compare to https://github.com/WayfireWM/wayfire-plugins-extra/blob/master/src/focus-steal-prevent.cpp ? |
|
This works based on xdg-activation and only tracks which view has focus. Mainly, it is to prevent the following scenario:
In contrast, the plugin in wpe focuses on keyboard (if I understand correctly), to prevent taking focus while typing, regardless of whether the requesting app has a valid token or not. So I think these can complement each other, with this PR more focusing on users' attention and also reducing the cases that even trigger the fsp plugin in wpe. |
|
Marking it a draft, since I this prevents focusing also in some valid cases, especially when used in combination with #2627 and desktop components, specifically when launching apps / actions from a menu opened from a layer-shell panel (such as with WayfireWM/wf-shell#293) |
d3c872b to
c269324
Compare
c269324 to
59008c2
Compare
59008c2 to
e3430b4
Compare
Continuation of #2527
This implements focus stealing in a straightforward way by disallowing xdg-activation tokens if the view that generated them is not focused anymore. So this is about the case when the user switches to another view before a token is used.