On Sunday 01 February 2009, 0xDeadC0de wrote: > I'd like to request that plasma webview become full on QWebViews instead > of QWebPages.
proxying a widget when we can paint directly to canvas would be a step backwards. let's look at the four issues you describe: * properly accept left clicks i don't even know what that means. you'll need to be more specific * properly accept right clicks ditto * context menu creation WebView makes the exact same call as QWebView does there. what i don't think we're doing is calling updatePositionDependentActions and swallowContextMenuEvent, and that might be the difference? * calls downloadRequested probably related to the issue above. attached is an untested patch that might help; if you could provide some test cases that i could use to test the exact behaviour you're expecting i could perhaps even test it. ;) in the meantime, feel free to try the patch. -- Aaron J. Seigo humru othro a kohnu se GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43 KDE core developer sponsored by Qt Software
Index: widgets/webview.cpp
===================================================================
--- widgets/webview.cpp (revision 917764)
+++ widgets/webview.cpp (working copy)
@@ -232,9 +232,16 @@
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();
+ }
}
}
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
