From a8aca3eb8ab46f3123b015a2fe3ed2cfda8e0eea Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Sun, 25 Jun 2023 17:40:17 +0200 Subject: [PATCH] fix: Full screen linux (#68) --- lib/main.dart | 4 +++- linux/my_application.cc | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index d51ebeb..e39dc21 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,9 +1,11 @@ +import 'package:flame/flame.dart'; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:lightrunners/title/title.dart'; -void main() { +void main() async { WidgetsFlutterBinding.ensureInitialized(); + await Flame.device.fullScreen(); runApp( MaterialApp( debugShowCheckedModeBanner: false, diff --git a/linux/my_application.cc b/linux/my_application.cc index 69973b0..92ab7c0 100644 --- a/linux/my_application.cc +++ b/linux/my_application.cc @@ -27,7 +27,7 @@ static void my_application_activate(GApplication* application) { // in case the window manager does more exotic layout, e.g. tiling. // If running on Wayland assume the header bar will work (may need changing // if future cases occur). - gboolean use_header_bar = TRUE; + gboolean use_header_bar = FALSE; #ifdef GDK_WINDOWING_X11 GdkScreen* screen = gtk_window_get_screen(window); if (GDK_IS_X11_SCREEN(screen)) {