workspace: Close windows using new layout manager API
Now that we have a new API to get all the windows and metaWindows from our layout manager, implement the deleteAll() method of the window clone using that API instead of looping through the children of the actor and using the source of the ClutterClone. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298
This commit is contained in:
parent
df149524d4
commit
40123ae6da
@ -290,16 +290,15 @@ var WindowClone = GObject.registerClass({
|
||||
}
|
||||
|
||||
deleteAll() {
|
||||
const windows = this.layout_manager.getWindows();
|
||||
|
||||
// Delete all windows, starting from the bottom-most (most-modal) one
|
||||
let windows = this.get_children();
|
||||
for (let i = windows.length - 1; i >= 1; i--) {
|
||||
let realWindow = windows[i].source;
|
||||
let metaWindow = realWindow.meta_window;
|
||||
for (const window of windows.reverse()) {
|
||||
const metaWindow = this.layout_manager.getMetaWindow(window);
|
||||
|
||||
metaWindow.delete(global.get_current_time());
|
||||
}
|
||||
|
||||
this.metaWindow.delete(global.get_current_time());
|
||||
this._closeRequested = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user