11/*
22 * SPDX-License-Identifier: GPL-3.0
3- * SPDX-FileCopyrightText: 2024 elementary, Inc. (https://elementary.io)
3+ * SPDX-FileCopyrightText: 2024-2025 elementary, Inc. (https://elementary.io)
44 */
55
66public class Dock.App : Object {
@@ -48,7 +48,7 @@ public class Dock.App : Object {
4848 public SimpleActionGroup action_group { get ; construct; }
4949 public Menu menu_model { get ; construct; }
5050
51- public Gee . List<AppWindow > windows { get ; private owned set ; } // Ordered by stacking order with topmost at 0
51+ public Gee . List<Window > windows { get ; private owned set ; } // Ordered by stacking order with topmost at 0
5252
5353 private static Dock . SwitcherooControl switcheroo_control;
5454
@@ -63,7 +63,7 @@ public class Dock.App : Object {
6363 }
6464
6565 construct {
66- windows = new Gee .LinkedList<AppWindow > ();
66+ windows = new Gee .LinkedList<Window > ();
6767
6868 action_group = new SimpleActionGroup ();
6969
@@ -138,9 +138,9 @@ public class Dock.App : Object {
138138 } else if (windows. size == 0 ) {
139139 app_info. launch (null , context);
140140 } else if (windows. size == 1 ) {
141- AppSystem . get_default (). desktop_integration. focus_window. begin (windows. first (). uid);
142- } else if (AppSystem . get_default (). desktop_integration != null ) {
143- AppSystem . get_default (). desktop_integration. show_windows_for. begin (app_info. get_id ());
141+ WindowSystem . get_default (). desktop_integration. focus_window. begin (windows. first (). uid);
142+ } else if (WindowSystem . get_default (). desktop_integration != null ) {
143+ WindowSystem . get_default (). desktop_integration. show_windows_for. begin (app_info. get_id ());
144144 }
145145 } catch (Error e) {
146146 critical (e. message);
@@ -184,9 +184,9 @@ public class Dock.App : Object {
184184 }
185185 }
186186
187- public void update_windows (Gee . List<AppWindow > ? new_windows) {
187+ public void update_windows (Gee . List<Window > ? new_windows) {
188188 if (new_windows == null ) {
189- windows = new Gee .LinkedList<AppWindow > ();
189+ windows = new Gee .LinkedList<Window > ();
190190 } else {
191191 windows = new_windows;
192192 }
@@ -201,18 +201,6 @@ public class Dock.App : Object {
201201 check_remove ();
202202 }
203203
204- public AppWindow ? find_window (uint64 window_uid) {
205- var found_win = windows. first_match ((win) = > {
206- return win. uid == window_uid;
207- });
208-
209- if (found_win != null ) {
210- return found_win;
211- } else {
212- return null ;
213- }
214- }
215-
216204 public void perform_unity_update (VariantIter prop_iter) {
217205 string prop_key;
218206 Variant prop_value;
@@ -241,7 +229,7 @@ public class Dock.App : Object {
241229 progress = 0 ;
242230 }
243231
244- private AppWindow [] current_windows;
232+ private Window [] current_windows;
245233 private uint current_index;
246234 private uint timer_id = 0 ;
247235 private bool should_wait = false ;
@@ -264,7 +252,7 @@ public class Dock.App : Object {
264252 return ;
265253 }
266254
267- AppSystem . get_default (). desktop_integration. focus_window. begin (current_windows[current_index]. uid);
255+ WindowSystem . get_default (). desktop_integration. focus_window. begin (current_windows[current_index]. uid);
268256
269257 // Throttle the scroll for performance and better visibility of the windows
270258 Timeout . add (250 , () = > {
@@ -282,7 +270,7 @@ public class Dock.App : Object {
282270 yield AppSystem . get_default (). sync_windows (); // Get the current stacking order
283271 current_index = windows. size > 1 && windows. first (). has_focus ? 1 : 0 ;
284272 current_windows = {};
285- foreach (AppWindow window in windows) {
273+ foreach (var window in windows) {
286274 current_windows + = window;
287275 }
288276 }
0 commit comments