summaryrefslogtreecommitdiff
path: root/www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-15 19:14:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-15 19:14:10 +0100
commitb0678711aadd72fd454634f42c5beff934e69a66 (patch)
tree889bc5d0d11ced892fd71be7f19d5dd07c645729 /www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch
parentb2842112832e3fe38bc7fceb1b3db4b24264e542 (diff)
Revert "www-client/qupzilla : drop our ebuild, since the fullscreen patch is now included in the latest release"
This reverts commit aa72a0236bd72d145f1671803a66639896a3575a.
Diffstat (limited to 'www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch')
-rw-r--r--www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch b/www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch
new file mode 100644
index 00000000..c18b4210
--- /dev/null
+++ b/www-client/qupzilla/files/qupzilla-2.1.2-fullscreen.patch
@@ -0,0 +1,102 @@
+From 5812721e4822ae363866df2cc9fc762b25061c92 Mon Sep 17 00:00:00 2001
+From: David Rosca <nowrep@gmail.com>
+Date: Sat, 19 Aug 2017 18:52:26 +0200
+Subject: [PATCH] BrowserWindow: Fix failing to enter fullscreen sometimes
+
+---
+ src/lib/app/browserwindow.cpp | 23 ++++++++++++++++-------
+ src/lib/app/browserwindow.h | 5 ++++-
+ 2 files changed, 20 insertions(+), 8 deletions(-)
+
+diff --git a/src/lib/app/browserwindow.cpp b/src/lib/app/browserwindow.cpp
+index 1eab597d7..2a41fddf2 100644
+--- a/src/lib/app/browserwindow.cpp
++++ b/src/lib/app/browserwindow.cpp
+@@ -683,6 +683,15 @@ void BrowserWindow::showSource(WebView *view)
+ view->showSource();
+ }
+
++void BrowserWindow::showNormal()
++{
++ if (m_normalWindowState & Qt::WindowMaximized) {
++ QMainWindow::showMaximized();
++ } else {
++ QMainWindow::showNormal();
++ }
++}
++
+ SideBar* BrowserWindow::addSideBar()
+ {
+ if (m_sideBar) {
+@@ -786,9 +795,9 @@ void BrowserWindow::toggleFullScreen()
+ }
+
+ if (isFullScreen())
+- setWindowState(windowState() & ~Qt::WindowFullScreen);
++ showNormal();
+ else
+- setWindowState(windowState() | Qt::WindowFullScreen);
++ showFullScreen();
+ }
+
+ void BrowserWindow::enterHtmlFullScreen()
+@@ -1049,9 +1058,9 @@ bool BrowserWindow::event(QEvent* event)
+ case QEvent::WindowStateChange: {
+ QWindowStateChangeEvent* ev = static_cast<QWindowStateChangeEvent*>(event);
+
+- if (!(ev->oldState() & Qt::WindowFullScreen) && windowState() & Qt::WindowFullScreen) {
++ if (!(m_oldWindowState & Qt::WindowFullScreen) && windowState() & Qt::WindowFullScreen) {
+ // Enter fullscreen
+- m_windowStates = ev->oldState();
++ m_normalWindowState = m_oldWindowState;
+
+ m_statusBarVisible = statusBar()->isVisible();
+ #ifndef Q_OS_MACOS
+@@ -1063,7 +1072,7 @@ bool BrowserWindow::event(QEvent* event)
+ m_navigationContainer->hide();
+ m_navigationToolbar->buttonExitFullscreen()->show();
+ }
+- else if (ev->oldState() & Qt::WindowFullScreen && !(windowState() & Qt::WindowFullScreen)) {
++ else if (m_oldWindowState & Qt::WindowFullScreen && !(windowState() & Qt::WindowFullScreen)) {
+ // Leave fullscreen
+ statusBar()->setVisible(m_statusBarVisible);
+ #ifndef Q_OS_MACOS
+@@ -1074,13 +1083,13 @@ bool BrowserWindow::event(QEvent* event)
+ m_navigationToolbar->setSuperMenuVisible(!m_menuBarVisible);
+ m_navigationToolbar->buttonExitFullscreen()->hide();
+ m_isHtmlFullScreen = false;
+-
+- setWindowState(m_windowStates);
+ }
+
+ if (m_hideNavigationTimer) {
+ m_hideNavigationTimer->stop();
+ }
++
++ m_oldWindowState = windowState();
+ break;
+ }
+
+diff --git a/src/lib/app/browserwindow.h b/src/lib/app/browserwindow.h
+index 51d4023ce..5e326fc34 100644
+--- a/src/lib/app/browserwindow.h
++++ b/src/lib/app/browserwindow.h
+@@ -141,6 +141,8 @@ public slots:
+ void loadAddress(const QUrl &url);
+ void showSource(WebView *view = Q_NULLPTR);
+
++ void showNormal();
++
+ private slots:
+ void addTab();
+ void openLocation();
+@@ -211,7 +213,8 @@ private slots:
+ bool m_menuBarVisible;
+ bool m_statusBarVisible;
+ bool m_isHtmlFullScreen;
+- Qt::WindowStates m_windowStates;
++ Qt::WindowStates m_oldWindowState = Qt::WindowNoState;
++ Qt::WindowStates m_normalWindowState = Qt::WindowNoState;
+ QTimer* m_hideNavigationTimer;
+
+ QList<QPointer<QWidget> > m_deleteOnCloseWidgets;