From 01f07a4a2ab5e5352765d73ab872cdac955d4289 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 21 Jan 2013 22:11:46 +0100 Subject: [PATCH] Properly fixed opening popup windows for QtWebKit 2.3 The workaround is now only used for QtWebKit 2.3 and it checks only for x, widht and height in QRect --- src/lib/popupwindow/popupwebpage.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/popupwindow/popupwebpage.cpp b/src/lib/popupwindow/popupwebpage.cpp index fdc49c623..df82b4b66 100644 --- a/src/lib/popupwindow/popupwebpage.cpp +++ b/src/lib/popupwindow/popupwebpage.cpp @@ -57,10 +57,15 @@ PopupWebPage::PopupWebPage(QWebPage::WebWindowType type, QupZilla* mainClass) void PopupWebPage::slotGeometryChangeRequested(const QRect &rect) { /* Very ugly hack for QtWebKit 2.3 - * It now sends QRect(0, 25, 100x100) if the popup window + * It now sends QRect(0, y, 100x100) if the popup window * geometry was not set in window.open call. */ - if (rect.isValid() && rect != QRect(0, 25, 100, 100)) { + + if (rect.isValid() +#if QTWEBKIT_FROM_2_3 + && rect.size() != QSize(100, 100) && rect.y() != 0 +#endif + ) { m_geometry = rect; m_createNewWindow = true; }