$OpenBSD$ index eaac435..cea0710 100644 --- widget/cocoa/nsAppShell.mm.orig Fri Feb 20 15:40:39 2015 +++ widget/cocoa/nsAppShell.mm Fri Feb 20 15:40:39 2015 @@ -243,6 +243,10 @@ nsAppShell::~nsAppShell() NS_OBJC_END_TRY_ABORT_BLOCK } +// An undocumented CoreGraphics framework method, present in the same form +// since at least OS X 10.5. +extern "C" CGError CGSSetDebugOptions(int options); + // Init // // Loads the nib (see bug 316076c21) and sets up the CFRunLoopSource used to @@ -332,6 +336,16 @@ nsAppShell::Init() gAppShellMethodsSwizzled = true; } + if (nsCocoaFeatures::OnYosemiteOrLater()) { + // Explicitly turn off CGEvent logging. This works around bug 1092855. + // If there are already CGEvents in the log, turning off logging also + // causes those events to be written to disk. But at this point no + // CGEvents have yet been processed. CGEvents are events (usually + // input events) pulled from the WindowServer. An option of 0x80000008 + // turns on CGEvent logging. + CGSSetDebugOptions(0x80000007); + } + [localPool release]; return rv;