Skip to content

Commit 84963fd

Browse files
committed
Beep when activate_workspace does nothing
1 parent 19be18e commit 84963fd

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/DesktopIntegration.vala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,13 @@ public class Gala.DesktopIntegration : GLib.Object {
139139
throw new IOError.NOT_FOUND ("Workspace not found");
140140
}
141141

142-
workspace.activate (wm.get_display ().get_current_time ());
142+
unowned var display = wm.get_display ();
143+
unowned var active_workspace_index = display.get_workspace_manager ().get_active_workspace_index ();
144+
if (active_workspace_index == index) {
145+
InternalUtils.bell_notify (display);
146+
} else {
147+
workspace.activate (display.get_current_time ());
148+
}
143149
}
144150

145151
public int get_n_workspaces () throws GLib.DBusError, GLib.IOError {

0 commit comments

Comments
 (0)