From cecc546b6baedf924653450ccef49b1cc2277cb0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 30 May 2026 22:13:08 +0000 Subject: [PATCH 1/3] Initial plan From 1c91b878243d9c4a50c408e53f66d04d9365de37 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 30 May 2026 22:16:11 +0000 Subject: [PATCH 2/3] fix: snapshot macOS miniwindow before minimize --- PinStickApp.swift | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/PinStickApp.swift b/PinStickApp.swift index 4d23686..18700b4 100644 --- a/PinStickApp.swift +++ b/PinStickApp.swift @@ -25,6 +25,16 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate { } } + func windowWillMiniaturize(_ notification: Notification) { + guard + let miniaturizingWindow = notification.object as? NSWindow, + let image = miniaturizingWindow.contentView?.snapshotImage() + else { + return + } + miniaturizingWindow.miniwindowImage = image + } + func windowShouldClose(_ sender: NSWindow) -> Bool { if sender.isDocumentEdited { let alert = NSAlert() @@ -50,6 +60,21 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate { } } +private extension NSView { + func snapshotImage() -> NSImage? { + guard bounds.width > 0, bounds.height > 0 else { + return nil + } + guard let bitmap = bitmapImageRepForCachingDisplay(in: bounds) else { + return nil + } + cacheDisplay(in: bounds, to: bitmap) + let image = NSImage(size: bounds.size) + image.addRepresentation(bitmap) + return image + } +} + struct ContentViewWrapper: NSViewControllerRepresentable { func makeNSViewController(context: Context) -> NSHostingController { let view = ContentView() From 342c9e3a1580cd939fef713a71149c94c9f21fe9 Mon Sep 17 00:00:00 2001 From: Kiya Rose Date: Mon, 1 Jun 2026 08:22:06 -0400 Subject: [PATCH 3/3] Bump Version --- cross-platform/package-lock.json | 4 ++-- cross-platform/package.json | 2 +- cross-platform/src-tauri/Cargo.toml | 2 +- cross-platform/src-tauri/tauri.conf.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cross-platform/package-lock.json b/cross-platform/package-lock.json index 6e009a6..468e984 100644 --- a/cross-platform/package-lock.json +++ b/cross-platform/package-lock.json @@ -1,12 +1,12 @@ { "name": "pinstick-cross", - "version": "2.8.1", + "version": "2.8.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pinstick-cross", - "version": "2.8.1", + "version": "2.8.2", "devDependencies": { "@tauri-apps/cli": "1.5.10" } diff --git a/cross-platform/package.json b/cross-platform/package.json index 0cd65f8..45ab74a 100644 --- a/cross-platform/package.json +++ b/cross-platform/package.json @@ -1,6 +1,6 @@ { "name": "pinstick-cross", - "version": "2.8.1", + "version": "2.8.2", "private": true, "type": "module", "scripts": { diff --git a/cross-platform/src-tauri/Cargo.toml b/cross-platform/src-tauri/Cargo.toml index 4575f35..08afcb6 100644 --- a/cross-platform/src-tauri/Cargo.toml +++ b/cross-platform/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pinstick" -version = "2.8.1" +version = "2.8.2" description = "PinStick cross-platform note pinning app" authors = ["SillyLittleTech"] edition = "2021" diff --git a/cross-platform/src-tauri/tauri.conf.json b/cross-platform/src-tauri/tauri.conf.json index 7e03c10..4504691 100644 --- a/cross-platform/src-tauri/tauri.conf.json +++ b/cross-platform/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "PinStick", - "version": "2.8.1" + "version": "2.8.2" }, "tauri": { "macOSPrivateApi": true,