File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed
Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 11# Unreleased
22
3+ - On macOS, wait with activating the application until the application has initialized.
4+ - On macOS, fix creating new windows when the application has a main menu.
35- On Windows, fix fractional deltas for mouse wheel device events.
46- On macOS, fix segmentation fault after dropping the main window.
57- On Android, ` InputEvent::KeyEvent ` is partially implemented providing the key scancode.
Original file line number Diff line number Diff line change @@ -13,10 +13,11 @@ use std::{
1313} ;
1414
1515use cocoa:: {
16- appkit:: { NSApp , NSWindow } ,
16+ appkit:: { NSApp , NSApplication , NSWindow } ,
1717 base:: { id, nil} ,
1818 foundation:: { NSAutoreleasePool , NSSize } ,
1919} ;
20+ use objc:: runtime:: YES ;
2021
2122use crate :: {
2223 dpi:: LogicalSize ,
@@ -272,6 +273,11 @@ impl AppState {
272273 }
273274
274275 pub fn launched ( ) {
276+ unsafe {
277+ let ns_app = NSApp ( ) ;
278+ // TODO: Consider allowing the user to specify they don't want their application activated
279+ ns_app. activateIgnoringOtherApps_ ( YES ) ;
280+ } ;
275281 HANDLER . set_ready ( ) ;
276282 HANDLER . waker ( ) . start ( ) ;
277283 HANDLER . set_in_callback ( true ) ;
Original file line number Diff line number Diff line change @@ -360,7 +360,7 @@ impl UnownedWindow {
360360
361361 let pool = unsafe { NSAutoreleasePool :: new ( nil) } ;
362362
363- let ns_app = create_app ( pl_attribs. activation_policy ) . ok_or_else ( || {
363+ create_app ( pl_attribs. activation_policy ) . ok_or_else ( || {
364364 unsafe { pool. drain ( ) } ;
365365 os_error ! ( OsError :: CreationError ( "Couldn't create `NSApplication`" ) )
366366 } ) ?;
@@ -386,7 +386,6 @@ impl UnownedWindow {
386386 ns_window. setBackgroundColor_ ( NSColor :: clearColor ( nil) ) ;
387387 }
388388
389- ns_app. activateIgnoringOtherApps_ ( YES ) ;
390389 win_attribs. min_inner_size . map ( |dim| {
391390 let logical_dim = dim. to_logical ( scale_factor) ;
392391 set_min_inner_size ( * ns_window, logical_dim)
You can’t perform that action at this time.
0 commit comments