bool NetscapePluginX11::handleMouseEvent(const WebMouseEvent& event) { ASSERT(m_plugin.isWindowed()); XEvent xEvent; initializeXEvent(xEvent); switch (event.type()) { case WebEvent::MouseDown: case WebEvent::MouseUp: setXButtonEventFields(xEvent, event, m_plugin.convertToRootView(IntPoint())); break; case WebEvent::MouseMove: setXMotionEventFields(xEvent, event, m_plugin.convertToRootView(IntPoint())); break; case WebEvent::MouseForceChanged: case WebEvent::MouseForceDown: case WebEvent::MouseForceUp: case WebEvent::NoType: case WebEvent::Wheel: case WebEvent::KeyDown: case WebEvent::KeyUp: case WebEvent::RawKeyDown: case WebEvent::Char: #if ENABLE(TOUCH_EVENTS) case WebEvent::TouchStart: case WebEvent::TouchMove: case WebEvent::TouchEnd: case WebEvent::TouchCancel: #endif return false; } return !m_plugin.NPP_HandleEvent(&xEvent); }
bool NetscapePlugin::platformHandleMouseEvent(const WebMouseEvent& event) { if (m_isWindowed) return false; if ((event.type() == WebEvent::MouseDown || event.type() == WebEvent::MouseUp) && event.button() == WebMouseEvent::RightButton && quirks().contains(PluginQuirks::IgnoreRightClickInWindowlessMode)) return false; XEvent xEvent; initializeXEvent(xEvent); switch (event.type()) { case WebEvent::MouseDown: case WebEvent::MouseUp: setXButtonEventFields(xEvent, event, convertToRootView(IntPoint())); break; case WebEvent::MouseMove: setXMotionEventFields(xEvent, event, convertToRootView(IntPoint())); break; case WebEvent::NoType: case WebEvent::Wheel: case WebEvent::KeyDown: case WebEvent::KeyUp: case WebEvent::RawKeyDown: case WebEvent::Char: #if ENABLE(GESTURE_EVENTS) case WebEvent::GestureScrollBegin: case WebEvent::GestureScrollEnd: #endif #if ENABLE(TOUCH_EVENTS) case WebEvent::TouchStart: case WebEvent::TouchMove: case WebEvent::TouchEnd: case WebEvent::TouchCancel: #endif return false; } return !NPP_HandleEvent(&xEvent); }