disable-screenshot-sound.patch 965 B

123456789101112131415161718192021222324
  1. --- a/js/ui/screenshot.js
  2. +++ b/js/ui/screenshot.js
  3. @@ -2385,8 +2343,7 @@ export async function captureScreenshot(texture, geometry, scale, cursor) {
  4. if (cursor === null)
  5. cursor = {texture: null, x: 0, y: 0, scale: 1};
  6. - global.display.get_sound_player().play_from_theme(
  7. - 'screen-capture', _('Screenshot taken'), null);
  8. + // patched: do not play a sound when taking a screenshot
  9. const pixbuf = await Shell.Screenshot.composite_to_stream(
  10. texture,
  11. @@ -2548,9 +2505,7 @@ export class ScreenshotService {
  12. shooter.connect('screenshot_taken', (s, area) => {
  13. const flashspot = new Flashspot(area);
  14. flashspot.fire(resolve);
  15. -
  16. - global.display.get_sound_player().play_from_theme(
  17. - 'screen-capture', _('Screenshot taken'), null);
  18. + // patched: do not play a sound when taking a screenshot
  19. });
  20. });
  21. }
  22. }