mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1539581 - Cleanup use of RegisterWindowMessgae in nsAppShell. r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D25235 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e7c6257344
commit
3a40fd71ea
@ -76,12 +76,8 @@ using namespace mozilla::ipc::windows;
|
||||
extern const wchar_t* kPropNameTabContent;
|
||||
#endif
|
||||
|
||||
// widget related message id constants we need to defer
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
// widget related message id constants we need to defer, see nsAppShell.
|
||||
extern UINT sAppShellGeckoMsgId;
|
||||
}
|
||||
} // namespace mozilla
|
||||
|
||||
namespace {
|
||||
|
||||
@ -390,7 +386,7 @@ ProcessOrDeferMessage(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
|
||||
default: {
|
||||
// Unknown messages only are logged in debug builds and sent to
|
||||
// DefWindowProc.
|
||||
if (uMsg && uMsg == mozilla::widget::sAppShellGeckoMsgId) {
|
||||
if (uMsg && uMsg == sAppShellGeckoMsgId) {
|
||||
// Widget's registered native event callback
|
||||
deferred = new DeferredSendMessage(hwnd, uMsg, wParam, lParam);
|
||||
}
|
||||
|
@ -157,13 +157,11 @@ SingleNativeEventPump::AfterProcessNextEvent(nsIThreadInternal* aThread,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
// Native event callback message.
|
||||
UINT sAppShellGeckoMsgId = RegisterWindowMessageW(L"nsAppShell:EventID");
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
||||
// RegisterWindowMessage values
|
||||
// Native event callback message
|
||||
const wchar_t* kAppShellGeckoEventId = L"nsAppShell:EventID";
|
||||
UINT sAppShellGeckoMsgId;
|
||||
// Taskbar button creation message
|
||||
const wchar_t* kTaskbarButtonEventId = L"TaskbarButtonCreated";
|
||||
UINT sTaskbarButtonCreatedMsg;
|
||||
|
||||
@ -331,8 +329,13 @@ nsresult nsAppShell::Init() {
|
||||
|
||||
// The hidden message window is used for interrupting the processing of native
|
||||
// events, so that we can process gecko events. Therefore, we only need it if
|
||||
// we are processing native events.
|
||||
// we are processing native events. Disabling this is required for win32k
|
||||
// syscall lockdown.
|
||||
if (XRE_UseNativeEventProcessing()) {
|
||||
sAppShellGeckoMsgId = ::RegisterWindowMessageW(kAppShellGeckoEventId);
|
||||
NS_ASSERTION(sAppShellGeckoMsgId,
|
||||
"Could not register hidden window event message!");
|
||||
|
||||
mLastNativeEventScheduled = TimeStamp::NowLoRes();
|
||||
|
||||
WNDCLASSW wc;
|
||||
|
Loading…
Reference in New Issue
Block a user