summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cpp2
-rw-r--r--src/globals.cpp2
-rw-r--r--src/globals.h2
-rw-r--r--src/main.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/src/dialog.cpp b/src/dialog.cpp
index 6104e22..c54dbb5 100644
--- a/src/dialog.cpp
+++ b/src/dialog.cpp
@@ -277,6 +277,8 @@ void Dialog::onCenterTimer() {
QRect desktopRect = QApplication::desktop()->availableGeometry(this);
QPoint center = desktopRect.center();
if (center != oldCenter_) {
+ if (_fullscreen)
+ this->resize(desktopRect.width(), desktopRect.height());
this->move(center.x() - this->width() / 2, center.y() - this->height() / 2);
oldCenter_ = center;
}
diff --git a/src/globals.cpp b/src/globals.cpp
index c6d3d6d..3fed150 100644
--- a/src/globals.cpp
+++ b/src/globals.cpp
@@ -32,6 +32,8 @@ const QString news_backup_filename("/tmp/vmchooser2/vmchooser2_news.xml");
QString urlBase;
+bool _fullscreen = false;
+
bool myLessThan(Session* a, Session* b) {
return *a < *b;
}
diff --git a/src/globals.h b/src/globals.h
index c0d09d3..b943238 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -52,6 +52,8 @@ extern const QString news_backup_filename;
extern QString urlBase;
+extern bool _fullscreen;
+
bool myLessThan(Session* a, Session* b);
#endif
diff --git a/src/main.cpp b/src/main.cpp
index bc8d508..b3dbce1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -231,6 +231,7 @@ int main(int argc, char *argv[]) {
if (size == "fullscreen") {
width = desktopRect.width();
height = desktopRect.height();
+ _fullscreen = true;
}
w.resize(width, height);