mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 602787 part.8 Don't implement nsWindowBase::DispatchPluginEvent() in windows/nsWindowBase.h r=jimm
This commit is contained in:
parent
9e0cc70277
commit
b251169d52
@ -11,7 +11,7 @@
|
||||
#include "nsString.h"
|
||||
#include "nsWindowBase.h"
|
||||
#include "nsWindowDefs.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "mozilla/BasicEvents.h"
|
||||
#include <windows.h>
|
||||
|
||||
#define NS_NUM_OF_KEYS 70
|
||||
|
@ -61,6 +61,7 @@ CPP_SOURCES += [
|
||||
'nsWidgetFactory.cpp',
|
||||
'nsWinGesture.cpp',
|
||||
'nsWindow.cpp',
|
||||
'nsWindowBase.cpp',
|
||||
'nsWindowDbg.cpp',
|
||||
'nsWindowGfx.cpp',
|
||||
]
|
||||
|
@ -172,6 +172,8 @@
|
||||
#include "mozilla/HangMonitor.h"
|
||||
#include "WinIMEHandler.h"
|
||||
|
||||
#include "npapi.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layers;
|
||||
|
29
widget/windows/nsWindowBase.cpp
Normal file
29
widget/windows/nsWindowBase.cpp
Normal file
@ -0,0 +1,29 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "nsWindowBase.h"
|
||||
|
||||
#include "mozilla/MiscEvents.h"
|
||||
#include "npapi.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
bool
|
||||
nsWindowBase::DispatchPluginEvent(const MSG& aMsg)
|
||||
{
|
||||
if (!PluginHasFocus()) {
|
||||
return false;
|
||||
}
|
||||
WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, this);
|
||||
nsIntPoint point(0, 0);
|
||||
InitEvent(pluginEvent, &point);
|
||||
NPEvent npEvent;
|
||||
npEvent.event = aMsg.message;
|
||||
npEvent.wParam = aMsg.wParam;
|
||||
npEvent.lParam = aMsg.lParam;
|
||||
pluginEvent.pluginEvent = &npEvent;
|
||||
pluginEvent.retargetToFocusedDocument = true;
|
||||
return DispatchWindowEvent(&pluginEvent);
|
||||
}
|
@ -6,9 +6,8 @@
|
||||
#ifndef nsWindowBase_h_
|
||||
#define nsWindowBase_h_
|
||||
|
||||
#include "mozilla/MiscEvents.h"
|
||||
#include "mozilla/EventForwards.h"
|
||||
#include "nsBaseWidget.h"
|
||||
#include "npapi.h"
|
||||
#include <windows.h>
|
||||
|
||||
/*
|
||||
@ -59,22 +58,7 @@ public:
|
||||
/*
|
||||
* Default dispatch of a plugin event.
|
||||
*/
|
||||
virtual bool DispatchPluginEvent(const MSG &aMsg)
|
||||
{
|
||||
if (!PluginHasFocus()) {
|
||||
return false;
|
||||
}
|
||||
mozilla::WidgetPluginEvent pluginEvent(true, NS_PLUGIN_INPUT_EVENT, this);
|
||||
nsIntPoint point(0, 0);
|
||||
InitEvent(pluginEvent, &point);
|
||||
NPEvent npEvent;
|
||||
npEvent.event = aMsg.message;
|
||||
npEvent.wParam = aMsg.wParam;
|
||||
npEvent.lParam = aMsg.lParam;
|
||||
pluginEvent.pluginEvent = (void *)&npEvent;
|
||||
pluginEvent.retargetToFocusedDocument = true;
|
||||
return DispatchWindowEvent(&pluginEvent);
|
||||
}
|
||||
virtual bool DispatchPluginEvent(const MSG& aMsg);
|
||||
|
||||
/*
|
||||
* Returns true if a plugin has focus on this widget. Otherwise, false.
|
||||
|
Loading…
Reference in New Issue
Block a user