Skip to content

Commit

Permalink
Merge branch 'g44-improve-restore-tiling-on-unminimize' into gnome-44
Browse files Browse the repository at this point in the history
  • Loading branch information
jtaala committed Apr 25, 2024
2 parents b465859 + 9d96947 commit ef5b272
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion tiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -1675,6 +1675,9 @@ border-radius: ${borderWidth}px;
}

destroy() {
this.getWindows().forEach(w => {
delete w.tiled_on_minimize;
});
this.signals.destroy();
this.signals = null;
this.background.destroy();
Expand Down Expand Up @@ -3767,10 +3770,23 @@ var focus_wrapper = Utils.dynamic_function_ref('focus_handler', this);
Push all minimized windows to the scratch layer
*/
function minimizeHandler(metaWindow) {
console.debug('minimized', metaWindow?.title);
if (metaWindow.minimized) {
console.debug('minimized', metaWindow?.title);
// check if was tiled
if (isTiled(metaWindow)) {
metaWindow.tiled_on_minimize = true;
}
Scratch.makeScratch(metaWindow);
}
else {
console.debug('unminimized', metaWindow?.title);
if (metaWindow.tiled_on_minimize) {
delete metaWindow.tiled_on_minimize;
Utils.later_add(Meta.LaterType.IDLE, () => {
Scratch.unmakeScratch(metaWindow);
});
}
}
}
var minimizeWrapper = Utils.dynamic_function_ref('minimizeHandler', this);

Expand Down

0 comments on commit ef5b272

Please sign in to comment.