File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed
platform_impl/apple/appkit Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -190,7 +190,8 @@ changelog entry.
190190### Fixed
191191
192192- On Orbital, ` MonitorHandle::name() ` now returns ` None ` instead of a dummy name.
193- - On macOS, fix ` SurfaceEvent ::Moved` sometimes being triggered unnecessarily on resize.
194- - On MacOS , package manifest definitions of ` LSUIElement ` will no longer be overridden with the
193+ - On macOS, fix ` WindowEvent ::Moved` sometimes being triggered unnecessarily on resize.
194+ - On macOS , package manifest definitions of ` LSUIElement ` will no longer be overridden with the
195195 default activation policy, unless explicitly provided during initialization.
196+ - On macOS, fix crash when calling ` drag_window() ` without a left click present.
196197- On X11, key events forward to IME anyway, even when it's disabled.
Original file line number Diff line number Diff line change @@ -284,8 +284,7 @@ impl CoreWindow for Window {
284284 }
285285
286286 fn drag_window ( & self ) -> Result < ( ) , RequestError > {
287- self . maybe_wait_on_main ( |delegate| delegate. drag_window ( ) ) ;
288- Ok ( ( ) )
287+ self . maybe_wait_on_main ( |delegate| delegate. drag_window ( ) )
289288 }
290289
291290 fn drag_resize_window (
Original file line number Diff line number Diff line change @@ -1171,10 +1171,12 @@ impl WindowDelegate {
11711171 }
11721172
11731173 #[ inline]
1174- pub fn drag_window ( & self ) {
1174+ pub fn drag_window ( & self ) -> Result < ( ) , RequestError > {
11751175 let mtm = MainThreadMarker :: from ( self ) ;
1176- let event = NSApplication :: sharedApplication ( mtm) . currentEvent ( ) . unwrap ( ) ;
1176+ let event =
1177+ NSApplication :: sharedApplication ( mtm) . currentEvent ( ) . ok_or ( RequestError :: Ignored ) ?;
11771178 self . window ( ) . performWindowDragWithEvent ( & event) ;
1179+ Ok ( ( ) )
11781180 }
11791181
11801182 #[ inline]
You can’t perform that action at this time.
0 commit comments