We'll be using hardware encoding for screencasts soon, so we'll likely see
more things go wrong in the future, including crashes of the whole
screencastService. To deal with this, we'll introduce logic to blocklist
certain recording pipelines in case of failure and also add some logic
to retry the recording automatically.
To allow for better messaging to the user in those failure cases, we want
to be aware in gnome-shell, what exactly the error in the recorder was.
So propagate the most common types of errors that can happen in the
ScreencastService to gnome-shell using the new DBusError module.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2976>
Commit 932ccac1 changed Source to use a regular constructor
instead of `_init()`.
Unfortunately that results in ordering issues for subclasses
that override `_createPolicy()`, if that method needs to access
any properties that are set in the constructor (as `this` is
only available after chaining up to the parent).
We can fix that by simply setting the policy from the constructor,
instead of relying on some overriden method being called.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>
We have several places where we create an application policy
from an app if possible, and fall back to a generic policy
otherwise.
Make that more convenient by adding a small helper method.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>
Since commit 932ccac1c27, the Source constructor takes a
properties object instead of individual arguments.
That means that the policy may now be set through a construct
property, and we shouldn't override it if that was the case.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3170>
This is to make it generally more in line with the stylesheet as well
as to resolve the blue and white bleeding together in dark mode.
It's also consistent with switches in recent mockups.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3077>
Ideally, the use case we have for MetaGroup would be removed but that
requires investigation that could be done as a future step
The function also expects a MetaWindowX11, so add a check to ensure
we don't crash at runtime if the function gets called on a wayland
client
Also removes an unused header import
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3157>
This drops all subclasses of `MessageTray.Source` that were used to
display system notifications. Now the `Source` returned from
`MessageTray.getSystemSource()` is used.
Ensure also that properties and methods that where set on the `Source`
are moved to the `Notification` object itself.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3156>
Generating the enums from a list of names means that developers
have to deduce the names of enum members themselves. That's more
important than a bit more convenience when adding a new enum, so
instead spell out the exported enums, and use the enums directly
when registering a domain.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3160>
Extensions like dash-to-dock use set_icon_geometry() to window.
This changes the dest and scale of ease animation of minimize and
makes it looks very strange. By setting dest opacity to 0 the animation
could be more natural.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2968>
Screencasts can be disabled for various reasons:
1. the service is not available (missing plugin etc.)
2. screencasts are not allowed by the session mode
(lock screen etc.)
3. the UI is invoked in screenshot-only mode (portal)
Currently each of those conditions is handled in a different
code path, which means that later conditions can re-enable
the button.
There's also an inconsistency whether disabling the button
is done via visibility or reactivity, which still allows
toggling the hidden button via shortcuts (although a hidden
button means that screencasts aren't supported at all, so
nothing will be recorded in that case).
Address this by updating the button from a dedicated function.
Fixes: 671df28a50 ("screenshot: Only handle mode-switch shortcut when
supported")
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7358
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3155>
The ID is currently hard-coded to the non-development one, with
the result that the .Devel app effectively doesn't have any
metainfo.
Fix that by configuring the file with the correct ID.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3158>
We sometimes return custom D-Bus errors. Right now those errors
are ad-hoc, which means receivers don't have a proper way of
checking whether a thrown GLib.Error corresponds to a particular
remote error.
In order to change that, we should define proper error enums and
domains, and register them with GDBus, so that there is an automatic
mapping between D-Bus errors and GLib.Errors.
The new module doesn't export any domains or enums yet, but provides
internal tooling to make these exports more convenient.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
Returning a GLib.Error from a method invocation will encode the
error when sent over the wire. In case the error itself is already
an encoded remote error, just passing it on will result in double
wrapping.
Avoid that by stripping any remote error information before
returning it.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3159>
Pipelines for non-protected branches are set to 'manual', and
thus cheap. However they may still get picked by `@marge-bot`,
meaning that the bot waits for the completion of a pipeline that
never starts.
Avoid that by not creating pipelines for branches with open
merge requests.
Credit to Jordan, who came up with this for gst.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3153>