summaryrefslogtreecommitdiff
path: root/ui/qt/main_window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/main_window.cpp')
-rw-r--r--ui/qt/main_window.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/ui/qt/main_window.cpp b/ui/qt/main_window.cpp
index fe06ef9e9f..17fed1914e 100644
--- a/ui/qt/main_window.cpp
+++ b/ui/qt/main_window.cpp
@@ -287,6 +287,7 @@ MainWindow::MainWindow(QWidget *parent) :
time_precision_actions_(NULL),
funnel_statistics_(NULL),
freeze_focus_(NULL),
+ was_maximized_(false),
capture_stopping_(false),
capture_filter_valid_(false)
#ifdef HAVE_LIBPCAP
@@ -421,6 +422,13 @@ MainWindow::MainWindow(QWidget *parent) :
main_ui_->menuCapture->setEnabled(false);
#endif
+ // Set OS specific shortcuts for fullscreen mode
+#if defined(Q_OS_MAC) && QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ main_ui_->actionViewFullScreen->setShortcut(QKeySequence::FullScreen);
+#else
+ main_ui_->actionViewFullScreen->setShortcut(QKeySequence(Qt::Key_F11));
+#endif
+
#if defined(Q_OS_MAC)
#if defined(QT_MACEXTRAS_LIB) && QT_VERSION < QT_VERSION_CHECK(5, 2, 1)
QMacNativeToolBar *ntb = QtMacExtras::setNativeToolBar(main_ui_->mainToolBar);
@@ -2183,6 +2191,11 @@ void MainWindow::changeEvent(QEvent* event)
wsApp->loadLanguage(locale);
}
break;
+#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
+ case QEvent::WindowStateChange:
+ main_ui_->actionViewFullScreen->setChecked(this->isFullScreen());
+ break;
+#endif
default:
break;
}