Attempt to fix a crash in event loop nesting tracking.
This commit is contained in:
parent
ec3af38ad9
commit
ea570c07b6
1 changed files with 12 additions and 7 deletions
|
|
@ -10,6 +10,7 @@
|
||||||
#include "ui/platform/win/ui_window_title_win.h"
|
#include "ui/platform/win/ui_window_title_win.h"
|
||||||
#include "base/platform/base_platform_info.h"
|
#include "base/platform/base_platform_info.h"
|
||||||
#include "base/platform/win/base_windows_safe_library.h"
|
#include "base/platform/win/base_windows_safe_library.h"
|
||||||
|
#include "base/integration.h"
|
||||||
#include "base/debug_log.h"
|
#include "base/debug_log.h"
|
||||||
#include "styles/palette.h"
|
#include "styles/palette.h"
|
||||||
|
|
||||||
|
|
@ -150,15 +151,19 @@ bool WindowHelper::NativeFilter::nativeEventFilter(
|
||||||
const QByteArray &eventType,
|
const QByteArray &eventType,
|
||||||
void *message,
|
void *message,
|
||||||
long *result) {
|
long *result) {
|
||||||
|
auto filtered = false;
|
||||||
const auto msg = static_cast<MSG*>(message);
|
const auto msg = static_cast<MSG*>(message);
|
||||||
const auto i = _windowByHandle.find(msg->hwnd);
|
const auto i = _windowByHandle.find(msg->hwnd);
|
||||||
return (i != end(_windowByHandle))
|
if (i != end(_windowByHandle)) {
|
||||||
? i->second->handleNativeEvent(
|
base::Integration::Instance().enterFromEventLoop([&] {
|
||||||
msg->message,
|
filtered = i->second->handleNativeEvent(
|
||||||
msg->wParam,
|
msg->message,
|
||||||
msg->lParam,
|
msg->wParam,
|
||||||
reinterpret_cast<LRESULT*>(result))
|
msg->lParam,
|
||||||
: false;
|
reinterpret_cast<LRESULT*>(result));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return filtered;
|
||||||
}
|
}
|
||||||
|
|
||||||
WindowHelper::WindowHelper(not_null<RpWidget*> window)
|
WindowHelper::WindowHelper(not_null<RpWidget*> window)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue