instantly_minimize = () => {
					before_minimize = {
						position: $w.css("position"),
						left: $w.css("left"),
						top: $w.css("top"),
						width: $w.css("width"),
						height: $w.css("height"),
					};

					$w.addClass("minimized-without-taskbar");
					if ($w.hasClass("maximized")) {
						$w.removeClass("maximized");
						$w.addClass("was-maximized");
						$w.$maximize.removeClass("window-action-restore");
						$w.$maximize.addClass("window-action-maximize");
					}
					$w.$minimize.removeClass("window-action-minimize");
					$w.$minimize.addClass("window-action-restore");
					if (before_unminimize) {
						$w.css({
							position: before_unminimize.position,
							left: before_unminimize.left,
							top: before_unminimize.top,
							width: before_unminimize.width,
							height: before_unminimize.height,
						});
					} else {
						$w.css({
							position: "fixed",
							top: `calc(100% - ${titlebar_height + 5}px)`,
							left: `${to_x}px`,
							width: `${to_width}px`,
							height: `${titlebar_height}px`,
						});
					}
				}
@type {{ position: string; left: string; top: string; width: string; height: string; }}