Explorar el Código

Fix draw canvas drags also moving the app window.

Prevent mouse-down on the canvas and draw overlay from being treated as window drag gestures when movable-by-background is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 hace 1 mes
padre
commit
cb3e413672
Se han modificado 1 ficheros con 5 adiciones y 0 borrados
  1. 5 0
      smart_printer/DrawPrintView.swift

+ 5 - 0
smart_printer/DrawPrintView.swift

@@ -55,6 +55,8 @@ final class DrawPrintOverlayView: NSView, AppearanceRefreshable {
 
     var onDismiss: (() -> Void)?
 
+    override var mouseDownCanMoveWindow: Bool { false }
+
     private let backButton = DrawPrintToolbarButton(symbolName: "chevron.left", accessibilityLabel: "Back")
     private let titleLabel = NSTextField(labelWithString: "Blank Canvas")
     private let canvasContainer = NSView()
@@ -247,6 +249,9 @@ final class DrawPrintOverlayView: NSView, AppearanceRefreshable {
 // MARK: - Canvas View
 
 final class BlankCanvasView: NSView, AppearanceRefreshable {
+    override var isOpaque: Bool { true }
+    override var mouseDownCanMoveWindow: Bool { false }
+
     var activeTool: CanvasTool = .draw {
         didSet { needsDisplay = true }
     }