-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Background portal implementation #73
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
If the background portal request is made by a non-flatpak application the |
I tend to think different, i don't see DBus as a hassle in vala, and our needs for the notification is simple enough that libnotify don't give us too much. at least, i would like to see the notification tied to a request, so the frontend can close it when not needed.
i think it's fine to allow any host application to install a .desktop file via the portal, isn't like they cannot fake a portal dialog and install it by themselves. after all, background monitoring only works with flatpaks. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Co-authored-by: Gustavo Marques <[email protected]>
Co-authored-by: Gustavo Marques <[email protected]>
Co-authored-by: Gustavo Marques <[email protected]>
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
Should be ready again however one thing to note is that for some reason the background monitor doesn't really start/work (e.g. its DBus interface is not visible in D-Spy although it is visible on GNOME). I'm going to investigate here still a bit (if anybody already got an idea/solution for this it would be much appreciated :)) but for now I wouldn't consider it blocking. That's because the only downside we really have is that background activities are only checked once on every iteration instead of twice. This means that it could take up to a minute for the frontend to realize an app is running in the background and notify the portal because new applications have to be marked as "in the background" twice before the frontend takes action. |
The BackgroundMonitor was introduced in the version 0.16 of the frontend. AFAIK the version we have in horus is 1.14.
looking at the branch for the 1.14 version, it check the application states two times per iteration, the only change that i see there was that the sleep time before the checks was reduced. |
Ah ok that's what I was missing; probably should have checked that first 😬 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
LFG 🚀 |
Todo:
Make notifications work (finish the NotifyBackground implementation) NotifyBackground might need some more work (tbh i've got no idea what I'm supposed to do with the handle) it's working and i've taken a look at the kde implementation and they don't use the handle as wellIn GetAppState: Don't hardcode application window state (background, at least one open, in the foreground) (might need some addition implementation effort on the gala side)CurrentlyGetAppState
only returns apps with at least one open window and being in the foreground is ignored. To change this (i.e. to return also background apps and check whether an app is in the foreground) additional implementation effort on the gala side is needed. IMHO for now this is enough and I wouldn't consider it blocking.Heavily inspired by the gtk implementation
For testing purposes one can use e.g. elementary/mail#882 and run it as flatpak