mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Fix crash in event loop nesting.
This commit is contained in:
@@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
#include "mainwindow.h"
|
||||
#include "mainwidget.h"
|
||||
#include "core/sandbox.h"
|
||||
#include "core/application.h"
|
||||
#include "core/crash_reports.h"
|
||||
#include "storage/localstorage.h"
|
||||
@@ -184,9 +185,11 @@ ApplicationDelegate *_sharedDelegate = nil;
|
||||
}
|
||||
|
||||
- (void) mediaKeyTap:(SPMediaKeyTap*)keyTap receivedMediaKeyEvent:(NSEvent*)e {
|
||||
if (e && [e type] == NSSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
|
||||
objc_handleMediaKeyEvent(e);
|
||||
}
|
||||
Core::Sandbox::Instance().customEnterFromEventLoop([&] {
|
||||
if (e && [e type] == NSSystemDefined && [e subtype] == SPSystemDefinedEventMediaKeys) {
|
||||
objc_handleMediaKeyEvent(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (void) ignoreApplicationActivationRightNow {
|
||||
|
Reference in New Issue
Block a user