summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2017-11-15 13:33:04 +1000
committerLorn Potter <lorn.potter@gmail.com>2017-11-15 08:31:09 +0000
commit03d51241e8b40ccdcabafee65f70ccdf41602a86 (patch)
treecf53378172d595ccf3552f5226004865c9d81974 /src/gui/kernel/qguiapplication.cpp
parent41ca0d5038318deeaae3a5a56a3359bf13add2f2 (diff)
wasm: keep QMainWindow on screen and show the titlebar
This works for now. Probably not entirely best way to do this. and it should probably be centered like QDialog. Change-Id: I0f5b5141b508aba4aec6e73bd8bec503590d5bfe Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 131c1a38ec..423ea2f801 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -249,8 +249,11 @@ static inline void clearFontUnlocked()
}
// Using aggregate initialization instead of ctor so we can have a POD global static
+#ifdef __EMSCRIPTEN__ //this keeps the screen on screen for whatever reason
+#define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER { Qt::TopLeftCorner, 4, 0, -1, -1 }
+#else
#define Q_WINDOW_GEOMETRY_SPECIFICATION_INITIALIZER { Qt::TopLeftCorner, -1, -1, -1, -1 }
-
+#endif
// Geometry specification for top level windows following the convention of the
// -geometry command line arguments in X11 (see XParseGeometry).
struct QWindowGeometrySpecification