Skip to content

Commit 19be18e

Browse files
committed
Throw error, update copyright year, fix warning
1 parent 7551c9d commit 19be18e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/DesktopIntegration.vala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 elementary, Inc. <https://elementary.io>
2+
* Copyright 2022-2025 elementary, Inc. <https://elementary.io>
33
* Copyright 2022 Corentin Noël <[email protected]>
44
* SPDX-License-Identifier: GPL-3.0-or-later
55
*/
@@ -75,7 +75,6 @@ public class Gala.DesktopIntegration : GLib.Object {
7575
public Window[] get_windows () throws GLib.DBusError, GLib.IOError {
7676
Window[] returned_windows = {};
7777
var apps = Gala.AppSystem.get_default ().get_running_apps ();
78-
var active_workspace = wm.get_display ().get_workspace_manager ().get_active_workspace ();
7978
foreach (unowned var app in apps) {
8079
foreach (weak Meta.Window window in app.get_windows ()) {
8180
if (!is_eligible_window (window)) {
@@ -137,9 +136,7 @@ public class Gala.DesktopIntegration : GLib.Object {
137136
public void activate_workspace (int index) throws GLib.DBusError, GLib.IOError {
138137
unowned var workspace = wm.get_display ().get_workspace_manager ().get_workspace_by_index (index);
139138
if (workspace == null) {
140-
critical ("...");
141-
// throw error maybe...
142-
return;
139+
throw new IOError.NOT_FOUND ("Workspace not found");
143140
}
144141

145142
workspace.activate (wm.get_display ().get_current_time ());

0 commit comments

Comments
 (0)