summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/webengine/quicknanobrowser/BrowserWindow.qml17
1 files changed, 4 insertions, 13 deletions
diff --git a/examples/webengine/quicknanobrowser/BrowserWindow.qml b/examples/webengine/quicknanobrowser/BrowserWindow.qml
index e8a9cb9ce..3b276a4a9 100644
--- a/examples/webengine/quicknanobrowser/BrowserWindow.qml
+++ b/examples/webengine/quicknanobrowser/BrowserWindow.qml
@@ -54,18 +54,6 @@ ApplicationWindow {
property Item currentWebView: tabs.currentIndex < tabs.count ? tabs.getTab(tabs.currentIndex).item : null
property int previousVisibility: Window.Windowed
- property bool isFullScreen: visibility == Window.FullScreen
- onIsFullScreenChanged: {
- // This is for the case where the system forces us to leave fullscreen.
- if (currentWebView && !isFullScreen) {
- currentWebView.state = ""
- if (currentWebView.isFullScreen) {
- currentWebView.fullScreenCancelled()
- fullScreenNotification.hide()
- }
- }
- }
-
width: 1300
height: 900
visible: true
@@ -127,8 +115,11 @@ ApplicationWindow {
Action {
shortcut: "Escape"
onTriggered: {
- if (browserWindow.isFullScreen)
+ if (currentWebView.state == "FullScreen") {
browserWindow.visibility = browserWindow.previousVisibility
+ fullScreenNotification.hide()
+ currentWebView.triggerWebAction(WebEngineView.ExitFullScreen);
+ }
}
}
Action {