Set a symbolic breakpoint on NSBeep and see whether it’s your code that’s calling it.
—Graham > On 24 Jun 2020, at 7:23 pm, Gabriel Zachmann via Cocoa-dev > <cocoa-dev@lists.apple.com> wrote: > > I have an app that should switch to fullscreen automatically, > if it is launched with a specific flag. > > This is my code to switch to fullscreen at startup (in AppDelegate.m): > > - (void) applicationWillFinishLaunching: (NSNotification *) notification > { > [self.window setFrameAutosaveName: @"de.zach.ArtSaverApp"]; // make > window "remember" its positions & size; do it before handling "-f" > > bool startInFullScreen = NO; > > // check flags ... > > if ( startInFullScreen ) > [self.window toggleFullScreen: nil]; > } > > > The problem is that , sometimes, the app does not receive keystrokes. > At least, I get the typical "Funk" sound when typing a key, > just like what occurs sometimes in other apps, when the focus is somehow out > of sync. > > The problem occurs only sometimes, but I could not find a pattern. > (Maybe, it's got something to do with timing?) > Should I put the switch to fullscreen mode somewhere else? > > > I tried to add this in -viewDidLoad in MasterWindowController: > > [[[self view] window] makeKeyAndOrderFront: NULL]; > > But it didn't help. > > Of course, when the app launches normally, and does not call toggleFullScreen, > then everything is fine with the keyboard focus. > > > Any insights or ideas will be greatly appreciated. > > Best regards, Gabriel > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/graham.cox%40bigpond.com > > This email sent to graham....@bigpond.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com