summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-08-03 16:02:21 +0200
committerKonstantin Käfer <mail@kkaefer.com>2015-08-04 14:08:20 +0200
commitac0b634bac0c22fd913c870900a1bf89c099ab81 (patch)
tree63b7e58f1825250e93c9e57b2997d4f52318ef63 /linux
parent66f0473bcf585724a0311416466b30694d7754d0 (diff)
downloadqtlocation-mapboxgl-ac0b634bac0c22fd913c870900a1bf89c099ab81.tar.gz
respect fullscreen flag in Linux app
Diffstat (limited to 'linux')
-rw-r--r--linux/main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index 9acbbb659f..c21d7446e8 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -31,11 +31,11 @@ void quit_handler(int) {
}
int main(int argc, char *argv[]) {
- int fullscreen_flag = 0;
+ bool fullscreen = false;
std::string style;
const struct option long_options[] = {
- {"fullscreen", no_argument, &fullscreen_flag, 'f'},
+ {"fullscreen", no_argument, 0, 'f'},
{"style", required_argument, 0, 's'},
{0, 0, 0, 0}
};
@@ -50,7 +50,7 @@ int main(int argc, char *argv[]) {
if (long_options[option_index].flag != 0)
break;
case 'f':
- // handle fullscreen_flag
+ fullscreen = true;
break;
case 's':
style = std::string("asset://") + std::string(optarg);
@@ -67,7 +67,7 @@ int main(int argc, char *argv[]) {
sigIntHandler.sa_flags = 0;
sigaction(SIGINT, &sigIntHandler, NULL);
- view = std::make_unique<GLFWView>();
+ view = std::make_unique<GLFWView>(fullscreen);
mbgl::SQLiteCache cache("/tmp/mbgl-cache.db");
mbgl::DefaultFileSource fileSource(&cache);