fix(background): Only emit RunningApplicationsChanged on toplevel create/destroy#250
Open
counterapparatus wants to merge 7 commits intopop-os:masterfrom
Open
fix(background): Only emit RunningApplicationsChanged on toplevel create/destroy#250counterapparatus wants to merge 7 commits intopop-os:masterfrom
counterapparatus wants to merge 7 commits intopop-os:masterfrom
Conversation
I based my implementation on the official specs as well as code from GNOME, KDE, Xapp (Xfce), and Pantheon (elementary). KDE's imminently readable codebase served as this implementation's primary inspiration. Autostart is deprecated but seemingly still used, so this implementation will still support it for compatibility. The Background portal depends on a working Access portal as `xdg-desktop-portal` calls it to show the initial warning. References: * https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.freedesktop.impl.portal.Background.html * https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/blob/main/src/background.c * https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/blob/master/src/background.cpp * https://github.com/linuxmint/xdg-desktop-portal-xapp/blob/f1c24244f90571209c56b7f45802b70e80da4922/src/background.c * https://github.com/elementary/portals/blob/d868cfa854c731e0f37615e225d5db07cc3f4604/src/Background/Portal.vala * flatpak/xdg-desktop-portal#1188
Squashed: * Rebase on the latest zbus * Fix types for get_app_state to not return an error nor a nested dict * Fix get_app_state so that apps default to running in the background unless they have open toplevels
`xdg-desktop-portal` expects this. It's easy enough to serialize this way.
…ate/destroy Don't emit the signal on update_toplevel events (focus changes, title changes, etc.) as this causes excessive signal spam. Only emit when windows are actually created or destroyed, matching GNOME's behavior.
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This continues the work from #70, addressing the signal spam issue raised by @ids1024.
The
RunningApplicationsChangedsignal was being emitted on everyupdate_toplevelevent (focus changes, title changes, etc.), causing excessive D-Bus signal spam. This change only emits the signal onnew_toplevelandtoplevel_closedevents, matching GNOME's behavior.Changes
update_output_toplevels()call fromupdate_toplevelhandler insrc/wayland/toplevel.rsTesting
Related