Commit Graph

17774 Commits

Author SHA1 Message Date
Fabio Tomat
4c07056760 Update Friulian translation 2023-04-28 07:52:59 +00:00
Jonas Dreßler
846bb84ff6 screencastService: Fixup pipeline fallback behavior
Calling _teardownPipeline() before _tryNextPipeline() was actually not a
good idea, it sets the pipelineState to STOPPED, which means we can't try
any of the following pipelines anymore.

Instead what we want to do is set the pipeline state of the old pipeline to
NULL when trying a new one, without calling _teardownPipeline() for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2754>
2023-04-26 18:02:57 +00:00
Jonas Dreßler
6476e62bff screenshot: Remove leftover code in property getter
According to Ivan (author of that piece of code), this is most likely a
leftover from a refactor and has no purpose anymore, so remove it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2753>
2023-04-26 19:31:53 +02:00
Daniel van Vugt
ce8af73745 glsl-effect: Don't overwrite the framebuffer's alpha/X channel
It's a waste of effort and will also taint screenshots if they
accidentally store that channel as alpha.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6389
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2650>
2023-04-26 13:42:34 +00:00
Jonas Dreßler
d67077bdf1 Remove keyboard shortcut to open the app menu in the panel
Now that the app menu indicator is no longer shown, it shouldn't be possible
to toggle the popup menu via keyboard shortcut anymore, so remove the code
and gsettings definitions for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2610>
2023-04-26 14:32:23 +02:00
Jonas Dreßler
3ea672efe6 panel: Remove the appMenu indicator
Over time the app menu has proved to be an issue and lately there has been
some movement to fix that (see also
https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/198).

As a first step, let's stop showing the indicator (not removing the code
yet) so that we can iterate on a more elegant solution.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2610>
2023-04-26 14:31:24 +02:00
robert.mader@collabora.com
b916ced2e6 screencastService: Add dmabuf/GL pipeline
This pipeline imports dmabufs and does format conversion using GL.
The `video/x-raw(memory:DMABuf)` filter ensures format negotiation
between `pipewiresrc` and Mutter will only succeed if Mutter advertises
dmabuf support as well, falling back to the next pipeline otherwise.

Using this pipeline frees Mutter from downloading buffer content on the
main thread which can have a big impact on compositor performance.
Doing format conversion on the GPU should further improve the overall
performance on most hardware.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2597>
2023-04-26 12:19:42 +00:00
Jonas Dreßler
fd730a4db7 screenshot: Also handle dbus service crashes
When the screencast dbus service crashes due to gstreamer, we should also
handle that and not pretend to continue recording.

Let's listen to g-name-owner changes for that and then also send a
notification about it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2752>
2023-04-26 13:36:31 +02:00
Jonas Dreßler
99923ac612 screenshot: Handle screencast errors properly
Send a notification and remove the screencast inidicator when we hear about
a screencast error from the dbus service.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2752>
2023-04-26 13:36:26 +02:00
Jonas Dreßler
c494597a91 screencastService: Signal errors via the internal dbus interface
Make sure gnome-shell gets notified of errors that happen during screen
recording using the screencastService, so that it can properly notify the
user about the error and tear down its state, too.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2752>
2023-04-26 13:35:57 +02:00
robert.mader@collabora.com
80d72cfd32 screencastService: Do not try multiple pipelines on old Pipewire versions
Pipewire versions < 0.3.67 may not fail immediatly on negotiation
errors, thus use the last/fallback pipeline directly.
Technically, a similar recent version of Wireplumber is required
as well, but we can't check that easily and the combination of old
Wireplumber and new Pipewire is quite unlikely.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2609>
2023-04-26 12:48:32 +02:00
Jonas Dreßler
9cb40c4814 screencastService: Add fallback mechanism for gstreamer pipelines
Introduce a fallback mechanism for gstreamer pipelines that allows to
define multiple pipelines and prefer them over each other.

The way this works is that we introduce a new STARTING PipelineState.
While the Recorder is in that state, it is allowed to tear down the
current pipeline and start another one whenever an error happens, this is
used to try multiple pipelines in a fixed order until a working one is
found.

Right now there's just a single pipeline using the existing vp8 encoder, the
actual new encoders and pipelines will be added in a separate commit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2609>
2023-04-26 11:39:16 +02:00
robert.mader@collabora.com
46517e02dd screencastService: Drop always-copy condition
The check for the Pipewire version was originally introduced in
d32c0348 which states:
> Since it is not clear yet when a proper solution will arrive,
> this makes use of `always-copy` as a workaround for now and
> should be reverted once it is no longer needed.

The check for a stable Gstreamer version with the mention proper fix was
introduced in d7b44319 and carried for the 43 cycle.

By the time Gnome 44 will be released all distros should have had enough
time to update their Gstreamer version - or backport the patches, in
case of not ustream-supported versions.

Thus lets drop it now.

Note: `always-copy` is not suitable for dmabuf buffers as it copies via
mmap.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2609>
2023-04-25 20:28:28 +02:00
Jonas Dreßler
cad01d154c screencastService: Set PipelineState to PLAYING on actual state-change
Right now when we tell gstreamer to move the pipeline to the state
PLAYING, we pretend that happens immediately and set our PipelineState
to PLAYING right afterwards.

In reality though it's more complicated than that: Gstreamer changes
states asynchronously and set_state() returns a Gst.StateChangeReturn.ASYNC.
In that case we should wait until the according STATE_CHANGED event happens
on the bus, and only then set our PipelineState to PLAYING.

Since the STATE_CHANGED event will also happen when set_state() returns
SUCCESS, we can use the same async logic for that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 18:57:51 +02:00
Jonas Dreßler
42af7e53a2 screencastService: Handle more gstreamer errors
Gstreamer can produce various errors, we shouldn't pretend those don't
exist and go on as usual when one happens. Instead, when an error
happens, tear down the pipeline, set our PipelineState to the new ERROR
state and bail out with a proper error message.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 18:57:47 +02:00
Jonas Dreßler
cbfbdc4be5 screencastService: Streamline teardown and error handling
We're tracking three different state-machines in the Recorder object:
The state of the gstreamer pipeline, the state of the screencast
session, and the sender of our dbus invocation that might vanish.

Properly handling errors that might appear in any of those three "black
boxes" is not easy, especially tearing down the other two when one of
them breaks.

So refactor the error handling here: Add a single error path for each of
those three states we're tracking, and make them all subsequently call
the _bailOutOnError() method. From there we tear down the other states and
call the error callbacks.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 17:17:41 +02:00
Jonas Dreßler
e6196b5b9f screencastService: Add an ERROR state for the pipeline state tracking
This will be useful when we start actually listening for ERROR events on
the gstreamer bus.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 17:17:41 +02:00
Jonas Dreßler
98cfce0ebe screencastService: Use strings for states
Using strings instead of numbers allows for easier debugging, it means
we can just log the state itself.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 17:17:41 +02:00
Jonas Dreßler
9eea48536a screencastService: Promisify Recorder start/stopRecording functions
This will allow for cleaner error handling in the following commits.

A benefit we get from it right now is having one less callback when
calling startRecording/stopRecording().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2197>
2023-04-25 17:17:41 +02:00
Florian Müllner
9711a918e7 status/bluetooth: Use 'Alias' for item labels
Unlike 'Name', the 'Alias' property can be changed by the user,
so it's more suitable for user-visible labels.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6626

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2751>
2023-04-25 14:16:42 +00:00
Florian Müllner
94345825a7 portalHelper: Use libadwaita instead of plain Gtk4
This gives us the proper platform stylesheet, as well as support
for dark style and other platform features.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
7a4055ec92 portalHelper: Stop using a subtitle
The pattern has become a lot less common, not least indicated
by the removal of the HeaderBar:subtitle property. And in this
case we are including an icon in the subtitle, which looks
completely out of place.

Address this by moving the URL/security information into a
popover menu, inspired by the similar drop-down in GNOME Web.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
d796244fb1 portalHelper: Port to Gtk4/WebKit6
WebKit was blocking the portal helper from being ported to Gtk4
together with other external tools. Now that WebKit6 is about to
become stable, the port can go ahead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
8cbf620639 portalHelper: Don't use deprecated API during policy decision
NavigationPolicyDecision.get_request() is deprecated, and the
method from the corresponding NavigationAction should be used
instead.

Rearrange the code to do that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
f7c8ff7a0c portalHelper: Adjust coding style
Most of the file already complies with the new style. Quickly change
the last remaining bits of legacy style before making further changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
6c6e3a8e76 portalHelper: Stop monkey-patching String.format()
It's not used, so no need to set it up.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Florian Müllner
a1f8f2efa1 portalHelper: Remove pointless destroyWindow() method
Years ago, the function used to clean up the cache when the
window was closed. But now that an ephemeral data manager is
used, nothing is cached anymore and the function is left as
a mere wrapper around this.destroy().

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2690>
2023-04-25 10:45:19 +00:00
Automeris naranja
65ec7b3fa8 screenshot: Use independent tooltips for the Screenshot/Screencast buttons
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6189

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2683>
2023-04-25 10:33:58 +00:00
Florian Müllner
9168e2fc63 environment: Remove old compatibility code
St.set_slow_down_factor() has been deprecated for over 3 years
(since 3.34). That's plenty of time for extensions to switch to
St.Settings.get().slow_down_factor.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2743>
2023-04-25 09:52:22 +00:00
Florian Müllner
2815f33458 status/backgroundApps: Show spinner when closing
It can take a little while for an app to quit after the user
clicked the close button, and another for the portal to pick
up the change.

In order to provide feedback to the user that the request is
being handled, replace the close button with a spinner.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6441

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2732>
2023-04-25 09:39:52 +00:00
Florian Müllner
d6d6bf727f workspaceThumbnail: Use click action
Now that we have a convenient way of combining a draggable with
a click action, we can port the code without making it more
complicated.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
3f9ee9cd5e dnd: Add addClickAction() method
The events that the draggable uses to initiate a drag operation
are the same as the ones a click action consumes for clicks.

It is still possible to combine the two, but it's finicky and far
from being straight-forward. To make this easier, add a dedicated
addClickAction() method to draggables that takes care of the
setup before adding the action to the draggable actor.

In the longer term, we'll want to turn DND into an action, and
have something like GTK's gesture group to allow combining actions
that would otherwise step on each other's toes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
a9ba9b7a47 popupMenu: Replace event handlers with click action
Actions provide a higher-level API than event handlers, not unlike
GTK's event controllers (albeit less complete). Allowing them to
take care of the low-level bits where possible is generally a good
idea.

Menu items are a very straight-forward case, with a good amount
of code saving, so port them over.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2742>
2023-04-25 09:01:16 +00:00
Florian Müllner
cd862aa53e panel: Drop unnecessary captured-event handler
The handler dates back to commit 50f248ec5b in 2011, and is
part of the original hack of making the activities button a
PanelMenu.Button while suppressing its menu.

By now, panel buttons without a menu have been properly supported
for years, but somehow that bit of the hack stuck around, even though
it is no longer actually needed (probably since the introduction of
DummyMenu.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2741>
2023-04-25 08:09:02 +00:00
Florian Müllner
b0ca64e777 Bump version to 44.1
Update NEWS.
2023-04-24 10:26:56 +02:00
Bobby Rong
a2e5cab3a4 docs: Remove invalid XInclude
This unbreaks the -Dgtk_doc=true build.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6486
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2749>
2023-04-24 10:55:40 +08:00
Florian Müllner
b8dcf85cc8 status/volume: Ignore capitalization for headphone detection
When we can't detect a headphone by form factor, we do a string
match on the port name. A match on 'Headphone' isn't less likely
to be valid than a match on 'headphone', so make sure we ignore
capitalization.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2691>
2023-04-21 18:53:00 +00:00
Florian Müllner
2eb3aff92c ci: Don't ignore init.js
Unlike js102, the gjs-check-syntax script supports modules, so
there's no longer a reason for ignoring the file.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Florian Müllner
0a420404c6 ci: Update JS tooling
Provided we use the correct version of the SpiderMonkey shell, we
can perform checks using the same engine that is used by gjs.

However some engine features are opt-in, so the set of features enabled
by gjs and js102 may differ. The obvious option for avoiding this is
replacing js102 with gjs for tests.

For that reason the check-potfiles.js script has been ported to gjs
and a second (simpler) script to replace `js102 --compileonly` was
added. This work happened in a separate repository to make sharing
between different JS-based projects easier.

Update the CI image to pull in those scripts and include gjs.

This will also address the issue that `js102 --compileonly` does not
handle modules.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Florian Müllner
ddae41456d ci: Remove duplicated cleanup
The template will already call `dnf clean all` after processing
packages and the script, so no need for us to call it as well.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2193>
2023-04-21 18:28:32 +00:00
Balló György
1ee070a14b autorunManager: Add missing await keyword
This fixes a regression introduced in commit c6861c0a3d

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2745>
2023-04-21 12:59:55 +00:00
Florian Müllner
f54af2639d ci: Update JS image
The image hasn't been updated for over a year, and it's now based
on an unsupported distro version. Jump directly to F38 which has
just been released.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2695>
2023-04-21 12:45:18 +00:00
Florian Müllner
5a7ba105c4 ci: Drop version suffix from job name
We don't build images for multiple distro versions, so all it does
is making version bumps more finicky.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2695>
2023-04-21 12:45:18 +00:00
Sebastian Keller
f6a8b63276 search: Expand search results view
Otherwise the search results can end up only as large as their content.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5924
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2744>
2023-04-21 01:08:23 +02:00
Florian Müllner
ea629cabbf ci: Make fringe meson-install arguments optional
Both the subdir and prepare arguments are very specific to
building the extensions-tool subproject stand-alone. In order
to make the script more generic, turn those required arguments
into optional --subdir and --prepare ones.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
d97c667937 ci: Add --help option to meson-install script
It's not really necessary in an internal script, but it's easy
enough and doesn't hurt *shrug*

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
cdd8d33587 ci: Use built-in option parsing in meson-install
This is less concise than the current ad-hoc parsing, but gets
us error handling ("unknown option --foo") and is easier to
extend.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
fac05b182c ci: Make sure to always clear meson-install checkout dir
We currently remove the directory at the end of the script, but
that code is only reached when all previous operations were
successful.

Address this by first using an absolute directory path in /tmp
instead of a "random" location based on the CWD, then set a trap
to remove it on exit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
919812a851 ci: Fix meson-install usage check
The script has four mandatory arguments, and also accepts optional
build options that are passed on to meson. Checking for the number
of arguments *before* filtering out the optional ones means that

`./install-meson-project.sh -Done=1 -Dtwo=2 -Dthree=3 -Dfour=4`

is considered valid, even though not a single required argument
is passed.

Fix this by filtering out the arguments before doing the usage
check. As it is a nice touch to have usage information at the
top of the script, move the message into a usage() function at
the top.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:56 +00:00
Florian Müllner
a5aeb6a3e6 ci: Stop running meson without subcommand
Invoking meson with no command is deprecated in favor of
`meson setup`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2712>
2023-04-20 15:59:55 +00:00