mirror of
https://github.com/swaywm/sway.git
synced 2026-04-17 06:46:32 -04:00
xdg-activation: distinguish activation and urgency requests
Check if the app that requested a token has provided a valid input serial and a focused surface. Downgrade activation request to urgency otherwise. This is mostly in line with what other Wayland compositors decided to do, and offers a better security than the original logic.
This commit is contained in:
parent
f6d22f8e68
commit
d19810eba8
5 changed files with 18 additions and 1 deletions
|
|
@ -412,6 +412,12 @@ void view_request_activate(struct sway_view *view, struct sway_seat *seat) {
|
|||
transaction_commit_dirty();
|
||||
}
|
||||
|
||||
void view_request_urgent(struct sway_view *view) {
|
||||
if (config->focus_on_window_activation != FOWA_NONE) {
|
||||
view_set_urgent(view, true);
|
||||
}
|
||||
}
|
||||
|
||||
void view_set_csd_from_server(struct sway_view *view, bool enabled) {
|
||||
sway_log(SWAY_DEBUG, "Telling view %p to set CSD to %i", view, enabled);
|
||||
if (view->xdg_decoration) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue