Skip to content

Commit b74db6d

Browse files
authored
Merge branch 'main' into lenemter/move-get-window-is-normal
2 parents e27fbff + 0defc45 commit b74db6d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/InternalUtils.vala

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Copyright 2012 Tom Beckmann
33
* Copyright 2012 Rico Tzschichholz
4-
* Copyright 2023 elementary, Inc. <https://elementary.io>
4+
* Copyright 2023-2025 elementary, Inc. <https://elementary.io>
55
* SPDX-License-Identifier: GPL-3.0-or-later
66
*/
77

@@ -264,16 +264,14 @@ namespace Gala {
264264
return sorted_windows;
265265
}
266266

267-
/**
268-
* Returns the workspaces geometry following the only_on_primary settings.
269-
*/
270-
public static Mtk.Rectangle get_workspaces_geometry (Meta.Display display) {
271-
if (Meta.Prefs.get_workspaces_only_on_primary ()) {
272-
return display.get_monitor_geometry (display.get_primary_monitor ());
273-
} else {
274-
float screen_width, screen_height;
275-
display.get_size (out screen_width, out screen_height);
276-
return { 0, 0, (int) screen_width, (int) screen_height };
267+
public static inline bool get_window_is_normal (Meta.Window window) {
268+
switch (window.window_type) {
269+
case Meta.WindowType.NORMAL:
270+
case Meta.WindowType.DIALOG:
271+
case Meta.WindowType.MODAL_DIALOG:
272+
return true;
273+
default:
274+
return false;
277275
}
278276
}
279277

0 commit comments

Comments
 (0)