[Webkit-unassigned] [Bug 35259] [Qt] QGraphicsScene mousePressEvent does not set the clickCausedFocus flag
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Mar 17 08:34:21 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=35259
--- Comment #2 from Joseph Ligman <joseph.ligman at nokia.com> 2010-03-17 08:34:21 PST ---
Hi Kent,
This is probably a minor issue. If you look at the following lines in
qwebpage.cpp, you can see the issue. To me it would make sense to remove the
handleSoftwareInputPanel altogether and just let the clients request it when
needed.
QGraphicsSceneMouseEvent
771 void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev)
772 {
773 WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
774 if (!frame->view())
775 return;
776
777 if (tripleClickTimer.isActive()
778 && (ev->pos().toPoint() - tripleClick).manhattanLength()
779 < QApplication::startDragDistance()) {
780 mouseTripleClickEvent(ev);
781 return;
782 }
783
784 bool accepted = false;
785 PlatformMouseEvent mev(ev, 1);
786 // ignore the event if we can't map Qt's mouse buttons to
WebCore::MouseButton
787 if (mev.button() != NoButton)
788 accepted = frame->eventHandler()->handleMousePressEvent(mev);
789 ev->setAccepted(accepted);
790 }
QMouseEvent
792 void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
793 {
822 if (newNode && oldNode != newNode)
823 clickCausedFocus = true;
824 }
928 void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
929 {
930 #if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
931 Frame* frame = page->focusController()->focusedFrame();
932 if (!frame)
933 return;
934
935 if (client && client->inputMethodEnabled()
936 && frame->document()->focusedNode()
937 && button == Qt::LeftButton && qApp->autoSipEnabled()) {
938 QStyle::RequestSoftwareInputPanel behavior =
QStyle::RequestSoftwareInputPanel(
939
client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel));
940 if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick)
{
941 QEvent event(QEvent::RequestSoftwareInputPanel);
942 QApplication::sendEvent(client->ownerWidget(), &event);
943 }
944 }
945
946 clickCausedFocus = false;
947 #endif
948 }
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list