summarylogtreecommitdiffstats
path: root/005-mythuiwebbrowser.patch
diff options
context:
space:
mode:
authorTaijian2020-02-12 23:49:47 +0100
committerTaijian2020-02-12 23:49:47 +0100
commit4b652b6a330b6f6400504cb7dc9c5b526ad59fd4 (patch)
tree33097468b1a79469c008d8830b51b31e8171edfe /005-mythuiwebbrowser.patch
parent76ea37f8556805b205878772ad7874e487c0d946 (diff)
downloadaur-4b652b6a330b6f6400504cb7dc9c5b526ad59fd4.tar.gz
incorporate proposed fix for 'white box problem'
Diffstat (limited to '005-mythuiwebbrowser.patch')
-rw-r--r--005-mythuiwebbrowser.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/005-mythuiwebbrowser.patch b/005-mythuiwebbrowser.patch
new file mode 100644
index 000000000000..3e9eb8936f08
--- /dev/null
+++ b/005-mythuiwebbrowser.patch
@@ -0,0 +1,58 @@
+--- a/libs/libmythui/mythuiwebbrowser.cpp
++++ b/libs/libmythui/mythuiwebbrowser.cpp
+@@ -873,4 +873,8 @@
+ void MythUIWebBrowser::Init(void)
+ {
++ // only do the initialisation for widgets not being stored in the global object store
++ if (parent() == GetGlobalObjectStore())
++ return;
++
+ if (m_initialized)
+ return;
+@@ -1128,4 +1132,7 @@
+ void MythUIWebBrowser::SetActive(bool active)
+ {
++ if (!m_browser)
++ return;
++
+ if (m_active == active)
+ return;
+@@ -1326,4 +1333,7 @@
+ void MythUIWebBrowser::Scroll(int dx, int dy)
+ {
++ if (!m_browser)
++ return;
++
+ QPoint startPos = m_browser->page()->currentFrame()->scrollPosition();
+ QPoint endPos = startPos + QPoint(dx, dy);
+@@ -1435,4 +1445,7 @@
+ void MythUIWebBrowser::UpdateScrollBars(void)
+ {
++ if (!m_browser)
++ return;
++
+ QPoint position = m_browser->page()->currentFrame()->scrollPosition();
+ if (m_verticalScrollbar)
+@@ -1461,5 +1474,5 @@
+ UpdateScrollBars();
+
+- if (!m_image)
++ if (!m_image || !m_browser)
+ return;
+
+@@ -1480,4 +1493,7 @@
+ void MythUIWebBrowser::Pulse(void)
+ {
++ if (!m_browser)
++ return;
++
+ if (m_scrollAnimation.IsActive() &&
+ m_destinationScrollPos !=
+@@ -1522,4 +1538,7 @@
+ bool MythUIWebBrowser::keyPressEvent(QKeyEvent *event)
+ {
++ if (!m_browser)
++ return false;
++
+ QStringList actions;
+ bool handled = false;