add_filter: Simplify

This commit is contained in:
Tor Hedin Brønner
2018-08-05 23:07:08 +02:00
parent 9e24210e2c
commit 90a076bb1d
+5 -7
View File
@@ -1406,25 +1406,23 @@ function disable () {
Types of windows which never should be tiled.
*/
function add_filter(meta_window) {
let add = true;
if (meta_window.get_transient_for()) {
// Never add transient windows
add = false;
return false;
}
if (meta_window.window_type !== Meta.WindowType.NORMAL) {
// And only add Normal windows
add = false;
return false;
}
if (meta_window.is_on_all_workspaces()) {
add = false;
return false;
}
if (Scratch.isScratchWindow(meta_window)) {
add = false;
return false;
}
return add;
return true;
}