Skip to content
Permalink
Browse files
2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>
        Reviewed by Kenneth Rohde Christiansen.

        [Qt] Show comboboxes on Maemo 5
        https://bugs.webkit.org/show_bug.cgi?id=34088

        Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
        get the combobox position right. The position on Maemo 5 is independent from the mouse
        and there's no QCursor::pos().

        * WebCoreSupport/QtFallbackWebPopup.cpp:
        (WebCore::QtFallbackWebPopup::show):

Canonical link: https://commits.webkit.org/45234@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@53851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
eseidel committed Jan 26, 2010
1 parent 35f860d commit e8cc8340ca0bd58c656d3384230725011c7a05b6
Showing with 21 additions and 0 deletions.
  1. +14 −0 WebKit/qt/ChangeLog
  2. +7 −0 WebKit/qt/WebCoreSupport/QtFallbackWebPopup.cpp
@@ -1,3 +1,17 @@
2010-01-26 Simon Hausmann <simon.hausmann@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Show comboboxes on Maemo 5
https://bugs.webkit.org/show_bug.cgi?id=34088

Don't try to show the combobox by simulating a mouse event from QCursor::pos() to
get the combobox position right. The position on Maemo 5 is independent from the mouse
and there's no QCursor::pos().

* WebCoreSupport/QtFallbackWebPopup.cpp:
(WebCore::QtFallbackWebPopup::show):

2010-01-26 Jedrzej Nowacki <jedrzej.nowacki@nokia.com>

Reviewed by Simon Hausmann.
@@ -110,9 +110,16 @@ void QtFallbackWebPopup::show()

}

// QCursor::pos() is not a great idea for a touch screen, but we don't need the coordinates
// as comboboxes with Qt on Maemo 5 come up in their full width on the screen.
// On the other platforms it's okay to use QCursor::pos().
#if defined(Q_WS_MAEMO_5)
m_combo->showPopup();
#else
QMouseEvent event(QEvent::MouseButtonPress, QCursor::pos(), Qt::LeftButton,
Qt::LeftButton, Qt::NoModifier);
QCoreApplication::sendEvent(m_combo, &event);
#endif
}

void QtFallbackWebPopup::hide()

0 comments on commit e8cc834

Please sign in to comment.