mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
BrowserWindow: Track webview that initiated html fullscreen
Fixes issue where it wouldn't be possible to leave fullscreen with F11 shortcut after closing webview that was in html fullscreen. BUG: 393797 FIXED-IN: 3.0.1
This commit is contained in:
parent
7689b73daa
commit
9375b474ba
|
@ -196,7 +196,6 @@ BrowserWindow::BrowserWindow(Qz::BrowserWindowType type, const QUrl &startUrl)
|
|||
, m_startTab(0)
|
||||
, m_startPage(0)
|
||||
, m_sideBarManager(new SideBarManager(this))
|
||||
, m_isHtmlFullScreen(false)
|
||||
, m_hideNavigationTimer(0)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
@ -927,7 +926,7 @@ void BrowserWindow::toggleTabsOnTop(bool enable)
|
|||
|
||||
void BrowserWindow::toggleFullScreen()
|
||||
{
|
||||
if (m_isHtmlFullScreen) {
|
||||
if (m_htmlFullScreenView) {
|
||||
weView()->triggerPageAction(QWebEnginePage::ExitFullScreen);
|
||||
return;
|
||||
}
|
||||
|
@ -939,7 +938,7 @@ void BrowserWindow::toggleFullScreen()
|
|||
}
|
||||
}
|
||||
|
||||
void BrowserWindow::toggleHtmlFullScreen(bool enable)
|
||||
void BrowserWindow::requestHtmlFullScreen(TabbedWebView *view, bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
setWindowState(windowState() | Qt::WindowFullScreen);
|
||||
|
@ -950,7 +949,7 @@ void BrowserWindow::toggleHtmlFullScreen(bool enable)
|
|||
if (m_sideBar)
|
||||
m_sideBar.data()->setHidden(enable);
|
||||
|
||||
m_isHtmlFullScreen = enable;
|
||||
m_htmlFullScreenView = enable ? view : nullptr;
|
||||
}
|
||||
|
||||
void BrowserWindow::showWebInspector()
|
||||
|
@ -1178,7 +1177,7 @@ bool BrowserWindow::fullScreenNavigationVisible() const
|
|||
|
||||
void BrowserWindow::showNavigationWithFullScreen()
|
||||
{
|
||||
if (m_isHtmlFullScreen)
|
||||
if (m_htmlFullScreenView)
|
||||
return;
|
||||
|
||||
if (m_hideNavigationTimer->isActive()) {
|
||||
|
@ -1237,7 +1236,7 @@ bool BrowserWindow::event(QEvent *event)
|
|||
m_navigationContainer->show();
|
||||
m_navigationToolbar->setSuperMenuVisible(!m_menuBarVisible);
|
||||
m_navigationToolbar->leaveFullScreen();
|
||||
m_isHtmlFullScreen = false;
|
||||
m_htmlFullScreenView = nullptr;
|
||||
}
|
||||
|
||||
if (m_hideNavigationTimer) {
|
||||
|
|
|
@ -151,7 +151,7 @@ public Q_SLOTS:
|
|||
void toggleTabsOnTop(bool enable);
|
||||
|
||||
void toggleFullScreen();
|
||||
void toggleHtmlFullScreen(bool enable);
|
||||
void requestHtmlFullScreen(TabbedWebView *view, bool enable);
|
||||
|
||||
void loadActionUrl(QObject* obj = 0);
|
||||
void loadActionUrlInNewTab(QObject* obj = 0);
|
||||
|
@ -233,7 +233,7 @@ private:
|
|||
// Remember visibility of menubar and statusbar after entering Fullscreen
|
||||
bool m_menuBarVisible;
|
||||
bool m_statusBarVisible;
|
||||
bool m_isHtmlFullScreen;
|
||||
QPointer<TabbedWebView> m_htmlFullScreenView;
|
||||
QTimer* m_hideNavigationTimer;
|
||||
|
||||
QList<QPointer<QWidget> > m_deleteOnCloseWidgets;
|
||||
|
|
|
@ -172,7 +172,7 @@ void TabbedWebView::requestFullScreen(bool enable)
|
|||
if (!m_window)
|
||||
return;
|
||||
|
||||
m_window->toggleHtmlFullScreen(enable);
|
||||
m_window->requestHtmlFullScreen(this, enable);
|
||||
}
|
||||
|
||||
void TabbedWebView::setAsCurrentTab()
|
||||
|
|
Loading…
Reference in New Issue
Block a user