Skip to content

Commit

Permalink
Utils: Remove bell (#1621)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmhewitt committed Apr 5, 2023
1 parent 37f6589 commit a630015
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
13 changes: 0 additions & 13 deletions lib/Utils.vala
Original file line number Diff line number Diff line change
Expand Up @@ -310,19 +310,6 @@ namespace Gala {
return container;
}

/**
* Ring the system bell, will most likely emit a <beep> error sound or, if the
* audible bell is disabled, flash the display
*
* @param display The display to flash, if necessary
*/
public static void bell (Meta.Display display) {
if (Meta.Prefs.bell_is_audible ())
Gdk.beep ();
else
display.get_compositor ().flash_display (display);
}

public static int get_ui_scaling_factor () {
return Meta.Backend.get_backend ().get_settings ().get_ui_scaling_factor ();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/WindowSwitcher.vala
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ namespace Gala {
var display = wm.get_display ();

if (container.get_n_children () == 0) {
Utils.bell (display);
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
return;
}

Expand Down Expand Up @@ -380,7 +380,7 @@ namespace Gala {
var current = cur_icon;

if (container.get_n_children () == 1) {
Utils.bell (display);
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
return;
}

Expand Down
4 changes: 2 additions & 2 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -723,13 +723,13 @@ namespace Gala {

// don't allow empty workspaces to be created by moving, if we have dynamic workspaces
if (Meta.Prefs.get_dynamic_workspaces () && Utils.get_n_windows (active) == 1 && next.index () == manager.n_workspaces - 1) {
Utils.bell (display);
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
return;
}

// don't allow moving into non-existing workspaces
if (active == next) {
Utils.bell (display);
Clutter.get_default_backend ().get_default_seat ().bell_notify ();
return;
}

Expand Down

0 comments on commit a630015

Please sign in to comment.