From 74fc48682a26bfde50ba9085568178b5713ecd86 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:31:11 +0100 Subject: [PATCH 1/2] macOS: remove unused file --- macos/Ghostty.xcodeproj/project.pbxproj | 1 - .../Sources/Helpers/DraggableWindowView.swift | 19 ------------------- 2 files changed, 20 deletions(-) delete mode 100644 macos/Sources/Helpers/DraggableWindowView.swift diff --git a/macos/Ghostty.xcodeproj/project.pbxproj b/macos/Ghostty.xcodeproj/project.pbxproj index ad2c54ca9..9bd36eaad 100644 --- a/macos/Ghostty.xcodeproj/project.pbxproj +++ b/macos/Ghostty.xcodeproj/project.pbxproj @@ -152,7 +152,6 @@ Helpers/AppInfo.swift, Helpers/CodableBridge.swift, Helpers/Cursor.swift, - Helpers/DraggableWindowView.swift, Helpers/ExpiringUndoManager.swift, "Helpers/Extensions/Double+Extension.swift", "Helpers/Extensions/EventModifiers+Extension.swift", diff --git a/macos/Sources/Helpers/DraggableWindowView.swift b/macos/Sources/Helpers/DraggableWindowView.swift deleted file mode 100644 index 8d88e2f66..000000000 --- a/macos/Sources/Helpers/DraggableWindowView.swift +++ /dev/null @@ -1,19 +0,0 @@ -import Cocoa -import SwiftUI - -struct DraggableWindowView: NSViewRepresentable { - func makeNSView(context: Context) -> DraggableWindowNSView { - return DraggableWindowNSView() - } - - func updateNSView(_ nsView: DraggableWindowNSView, context: Context) { - // No need to update anything here - } -} - -class DraggableWindowNSView: NSView { - override func mouseDown(with event: NSEvent) { - guard let window = self.window else { return } - window.performDrag(with: event) - } -} From 1249f3b88cda09ca81a2d3c983036093983982e8 Mon Sep 17 00:00:00 2001 From: Lukas <134181853+bo2themax@users.noreply.github.com> Date: Thu, 1 Jan 2026 14:37:08 +0100 Subject: [PATCH 2/2] macOS: temporarily disable `window.isMovable` to fix #10110 --- .../Ghostty/Surface View/SurfaceDragSource.swift | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Ghostty/Surface View/SurfaceDragSource.swift b/macos/Sources/Ghostty/Surface View/SurfaceDragSource.swift index 21416ac75..059428b15 100644 --- a/macos/Sources/Ghostty/Surface View/SurfaceDragSource.swift +++ b/macos/Sources/Ghostty/Surface View/SurfaceDragSource.swift @@ -104,7 +104,11 @@ extension Ghostty { /// Whether the current drag was cancelled by pressing escape. private var dragCancelledByEscape: Bool = false - + + /// Original value of `window.isMovable` to restore + /// when the mouse exits. + private var isWindowMovable: Bool? + deinit { if let escapeMonitor { NSEvent.removeMonitor(escapeMonitor) @@ -131,10 +135,18 @@ extension Ghostty { } override func mouseEntered(with event: NSEvent) { + // Temporarily disable `isMovable` to fix + // https://github.com/ghostty-org/ghostty/issues/10110 + isWindowMovable = window?.isMovable + window?.isMovable = false onHoverChanged?(true) } override func mouseExited(with event: NSEvent) { + if let isWindowMovable { + window?.isMovable = isWindowMovable + self.isWindowMovable = nil + } onHoverChanged?(false) }