improved context menu handling

svn path=/branches/KDE/4.2/kdelibs/; revision=919700
This commit is contained in:
Aaron J. Seigo 2009-02-01 14:56:57 +00:00
parent 930eaad353
commit 5171e27826

View File

@ -232,9 +232,16 @@ void WebView::contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
QContextMenuEvent ce(static_cast<QContextMenuEvent::Reason>(event->reason()),
event->pos().toPoint(), event->screenPos());
d->page->event(&ce);
if (ce.isAccepted()) {
if (d->page->swallowContextMenuEvent(&ce)) {
event->accept();
} else {
d->page->updatePositionDependentActions(event->pos().toPoint());
d->page->event(&ce);
if (ce.isAccepted()) {
event->accept();
}
}
}