Skip to content

Commit 2673074

Browse files
committed
DesktopIntegration: don't send dock windows
1 parent 550d053 commit 2673074

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

lib/Utils.vala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,17 @@ namespace Gala {
338338
}
339339
}
340340

341+
public static inline bool get_window_and_ancestors_normal (Meta.Window window) {
342+
var normal = true;
343+
window.foreach_ancestor ((ancestor_window) => {
344+
normal = normal || get_window_is_normal (ancestor_window);
345+
346+
return normal;
347+
});
348+
349+
return normal;
350+
}
351+
341352
public static int calculate_button_size (float monitor_scale) {
342353
return Utils.scale_to_int (BUTTON_SIZE, monitor_scale);
343354
}

src/DesktopIntegration.vala

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,7 @@ public class Gala.DesktopIntegration : GLib.Object {
7474
}
7575

7676
private bool is_eligible_window (Meta.Window window) {
77-
if (window.is_override_redirect ()) {
78-
return false;
79-
}
80-
81-
switch (window.get_window_type ()) {
82-
case Meta.WindowType.NORMAL:
83-
case Meta.WindowType.DIALOG:
84-
case Meta.WindowType.MODAL_DIALOG:
85-
case Meta.WindowType.UTILITY:
86-
return true;
87-
default:
88-
return false;
89-
}
77+
return !window.is_override_redirect () && Utils.get_window_and_ancestors_normal (window);
9078
}
9179

9280
public Window[] get_windows () throws GLib.DBusError, GLib.IOError {

0 commit comments

Comments
 (0)