summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-11-20 11:38:21 -0500
committerRay Strode <rstrode@redhat.com>2009-11-20 11:38:21 -0500
commit1487578ff4eb3b32f8141cfb7fae97bb341ccdc2 (patch)
tree1149c2608280a721774b6671102f8901e0fcfd57
parent5a03a5d57897837ce05db3dcf925218770730b01 (diff)
downloadmetacity-1487578ff4eb3b32f8141cfb7fae97bb341ccdc2.tar.gz
sound: ask libcanberra to cache alert/desktop switch sounds
These sounds are good candidates for caching in the sound server, to save a bit of CPU and make reaction faster. Hence, tell libcanberra to cache them.
-rw-r--r--src/core/bell.c1
-rw-r--r--src/core/workspace.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/core/bell.c b/src/core/bell.c
index 92d1dbd3..1e01cd63 100644
--- a/src/core/bell.c
+++ b/src/core/bell.c
@@ -292,6 +292,7 @@ meta_bell_notify (MetaDisplay *display,
ca_proplist_create (&p);
ca_proplist_sets (p, CA_PROP_EVENT_ID, "bell-window-system");
ca_proplist_sets (p, CA_PROP_EVENT_DESCRIPTION, _("Bell event"));
+ ca_proplist_sets (p, CA_PROP_CANBERRA_CACHE_CONTROL, "permanent");
window = meta_display_lookup_x_window (display, xkb_bell_event->window);
if (!window && (display->focus_window) && (display->focus_window->frame))
diff --git a/src/core/workspace.c b/src/core/workspace.c
index a0170a68..063f867c 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -358,6 +358,7 @@ static void workspace_switch_sound(MetaWorkspace *from,
ca_context_play(ca_gtk_context_get(), 1,
CA_PROP_EVENT_ID, e,
CA_PROP_EVENT_DESCRIPTION, "Desktop switched",
+ CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
NULL);
finish: