[gnome-settings-daemon] Moving 'screen-capture' sound effect from gsd to gnome-shell
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] Moving 'screen-capture' sound effect from gsd to gnome-shell
- Date: Thu, 11 Feb 2021 18:56:41 +0000 (UTC)
commit e9b98e14ae1b7915e3a13e4a3605f07360ffeff1
Author: Brion Vibber <bvibber wikimedia org>
Date: Sun Nov 24 17:22:09 2019 -0800
Moving 'screen-capture' sound effect from gsd to gnome-shell
This allows the shell to start the visual flash and auditory click
sound at the same time, between the actual screen capture and the
compression of the PNG.
Reduces perceived latency of the screenshot effect significantly
on very high resolution screens, especially paired with slow CPUs.
Companion shell patch: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1658
plugins/media-keys/gsd-screenshot-utils.c | 16 ----------------
1 file changed, 16 deletions(-)
---
diff --git a/plugins/media-keys/gsd-screenshot-utils.c b/plugins/media-keys/gsd-screenshot-utils.c
index b3eb6593..bf792d9c 100644
--- a/plugins/media-keys/gsd-screenshot-utils.c
+++ b/plugins/media-keys/gsd-screenshot-utils.c
@@ -23,7 +23,6 @@
*/
#include <config.h>
-#include <canberra-gtk.h>
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <glib/gi18n.h>
@@ -53,20 +52,6 @@ typedef struct {
GDBusConnection *connection;
} ScreenshotContext;
-static void
-screenshot_play_sound_effect (const gchar *event_id,
- const gchar *event_desc)
-{
- ca_context *c;
-
- c = ca_gtk_context_get ();
- ca_context_play (c, 0,
- CA_PROP_EVENT_ID, event_id,
- CA_PROP_EVENT_DESCRIPTION, event_desc,
- CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
- NULL);
-}
-
static void
screenshot_context_free (ScreenshotContext *ctx)
{
@@ -115,7 +100,6 @@ bus_call_ready_cb (GObject *source,
{
if (!ctx->copy_to_clipboard)
{
- screenshot_play_sound_effect ("screen-capture", _("Screenshot taken"));
screenshot_save_to_recent (ctx);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]